diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-04-08 02:09:40 +0200 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-04-09 19:06:29 +0000 |
commit | c805fa8f7eb99a77b29678bd7e4cb57c486cf013 (patch) | |
tree | 33e40bde141a8aac34006ef3918b1f23a061c047 /src/gui | |
parent | b5ff7aa3a5adf5e03ea1e1190b720158fc4a97a8 (diff) | |
download | plus-c805fa8f7eb99a77b29678bd7e4cb57c486cf013.tar.gz plus-c805fa8f7eb99a77b29678bd7e4cb57c486cf013.tar.bz2 plus-c805fa8f7eb99a77b29678bd7e4cb57c486cf013.tar.xz plus-c805fa8f7eb99a77b29678bd7e4cb57c486cf013.zip |
Simplify and remove linter's choking hazard
windowmanager.cpp(456, 9): Incorrect align on long parameter list in
front of 'SetClassLongPtr', it should be aligen in column 25.
[RULE_4_1_C_align_long_function_parameter_list]
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windowmanager.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index 346013639..e0172cca5 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -448,22 +448,21 @@ void WindowManager::setIcon() icon = LoadIcon(GetModuleHandle(nullptr), "A"); } - if (icon) - { -#ifdef WIN64 + #ifdef USE_SDL2 - SetClassLongPtr(pInfo.info.win.window, + const HWND& windowRef = pInfo.info.win.window; #else - SetClassLongPtr(pInfo.window, + const HWND& windowRef = pInfo.window; #endif // USE_SDL2 + + if (icon) + { +#ifdef WIN64 + SetClassLongPtr(windowRef, GCLP_HICON, reinterpret_cast<LONG_PTR>(icon)); #else // WIN64 -#ifdef USE_SDL2 - SetClassLong(pInfo.info.win.window, -#else - SetClassLong(pInfo.window, -#endif // USE_SDL2 + SetClassLong(windowRef, GCL_HICON, reinterpret_cast<LONG>(icon)); #endif // WIN64 |