summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-03-27 15:48:54 +0000
committerpeter1138 <peter1138@openttd.org>2008-03-27 15:48:54 +0000
commitcb7b5877469e16308289a8c853f1c11e21283cb0 (patch)
tree19922dbd3ab8f9b031264a12448be11c9a76242e
parent8988c1f7c16002e42ee81e782cfc74bb53d90594 (diff)
downloadopenttd-cb7b5877469e16308289a8c853f1c11e21283cb0.tar.xz
(svn r12445) -Fix: Add missing compile asserts for window data structs
-rw-r--r--src/genworld_gui.cpp1
-rw-r--r--src/newgrf_gui.cpp1
-rw-r--r--src/signs_gui.cpp1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 1db28208f..65ae87287 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -48,6 +48,7 @@ struct generate_d {
uint y;
char name[64];
};
+assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(generate_d));
extern void SwitchMode(int new_mode);
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index f153caced..7c44be08e 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -114,6 +114,7 @@ struct newgrf_add_d {
GRFConfig **list;
const GRFConfig *sel;
};
+assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(newgrf_add_d));
/* Names of the add a newgrf window widgets */
enum AddNewGRFWindowWidgets {
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index bf737455e..ce533954c 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -163,6 +163,7 @@ void ShowSignList()
struct editsign_d : querystr_d {
SignID cur_sign;
};
+assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(editsign_d));
enum QueryEditSignWidgets {
QUERY_EDIT_SIGN_WIDGET_TEXT = 3,