mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Use same style for optional and avoid double check
I did not know that `std::optional::value()` did checked access. And I still prefer a more explicit .has_value() over boolean conversion, but this seems to be the accepted way to do this.
This commit is contained in:
@@ -26,8 +26,8 @@ Win32Timer::Win32Timer(HWND window_handle,
|
||||
}
|
||||
|
||||
Win32Timer::~Win32Timer() {
|
||||
if (timer_id.has_value()) {
|
||||
KillTimer(window_handle, timer_id.value());
|
||||
if (timer_id) {
|
||||
KillTimer(window_handle, *timer_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user