Remove redundant conditions

As mentioned in C++ Core Guidelines ES.87.
This commit is contained in:
Robbert van der Helm
2020-06-05 22:18:40 +02:00
parent 047163c6f5
commit ff298f3f46
4 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -258,7 +258,7 @@ LRESULT CALLBACK window_proc(HWND handle,
reinterpret_cast<CREATESTRUCT*>(lParam);
const auto editor =
static_cast<Editor*>(window_parameters->lpCreateParams);
if (editor == nullptr) {
if (!editor) {
break;
}
@@ -272,7 +272,7 @@ LRESULT CALLBACK window_proc(HWND handle,
case WM_TIMER: {
auto editor = reinterpret_cast<Editor*>(
GetWindowLongPtr(handle, GWLP_USERDATA));
if (editor == nullptr || wParam != idle_timer_id) {
if (!editor || wParam != idle_timer_id) {
break;
}