summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-05-30 11:01:05 +0000
committeralberth <alberth@openttd.org>2009-05-30 11:01:05 +0000
commit5eecf3e5cb6da881ca4095561d19dfc4364d2823 (patch)
tree05dc4a29ab068efd3c7137c7713c3dec422634b3 /src/window.cpp
parent1448160e1e63a9a1945a91c79fe8c2068ba081bd (diff)
downloadopenttd-5eecf3e5cb6da881ca4095561d19dfc4364d2823.tar.xz
(svn r16463) -Cleanup: Code style fixes.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 191fc5b31..2009f15dd 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -289,7 +289,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, bool double_click)
* So unless the clicked widget is the caption bar, change focus to this widget */
if (wi->type != WWT_CAPTION) {
/* Close the OSK window if a edit box loses focus */
- if (w->focused_widget && w->focused_widget->type == WWT_EDITBOX && // An edit box was previously selected
+ if (w->focused_widget != NULL && w->focused_widget->type == WWT_EDITBOX && // An edit box was previously selected
w->focused_widget != wi && // and focus is going to change
w->window_class != WC_OSK) { // and it is not the OSK window
DeleteWindowById(WC_OSK, 0);
@@ -297,7 +297,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, bool double_click)
if (w->focused_widget != wi) {
/* Repaint the widget that loss focus. A focused edit box may else leave the caret left on the screen */
- if (w->focused_widget) w->InvalidateWidget(w->focused_widget - w->widget);
+ if (w->focused_widget != NULL) w->InvalidateWidget(w->focused_widget - w->widget);
focused_widget_changed = true;
w->focused_widget = wi;
}
@@ -812,7 +812,7 @@ void Window::Initialize(int x, int y, int min_width, int min_height,
this->width = min_width;
this->height = min_height;
AssignWidgetToWindow(this, widget);
- this->focused_widget = 0;
+ this->focused_widget = NULL;
this->resize.width = min_width;
this->resize.height = min_height;
this->resize.step_width = 1;