diff options
author | Juanjo <juanjo.ng.83@gmail.com> | 2013-10-18 18:52:01 +0000 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-01-04 23:55:07 +0100 |
commit | 9e30054de9de1b826137279d333648ca09217ef7 (patch) | |
tree | 83395526ab849be02373ce2925df26ec9c2afe0c | |
parent | 16a91130a791de4b219c387c7aeccd15f14ea26f (diff) | |
download | openttd-9e30054de9de1b826137279d333648ca09217ef7.tar.xz |
Codechange: Use window class as expected.
-rw-r--r-- | src/window.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp index 5b9dad677..22084c200 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1741,7 +1741,7 @@ static Point LocalGetWindowPlacement(const WindowDesc *desc, int16 sm_width, int int16 default_width = max(desc->GetDefaultWidth(), sm_width); int16 default_height = max(desc->GetDefaultHeight(), sm_height); - if (desc->parent_cls != 0 /* WC_MAIN_WINDOW */ && (w = FindWindowById(desc->parent_cls, window_number)) != NULL) { + if (desc->parent_cls != WC_NONE && (w = FindWindowById(desc->parent_cls, window_number)) != NULL) { bool rtl = _current_text_dir == TD_RTL; if (desc->parent_cls == WC_BUILD_TOOLBAR || desc->parent_cls == WC_SCEN_LAND_GEN) { pt.x = w->left + (rtl ? w->width - default_width : 0); |