(svn r12445) -Fix: Add missing compile asserts for window data structs
authorpeter1138
Thu, 27 Mar 2008 15:48:54 +0000
changeset 9245 ea89c79affde
parent 9244 59bf7f93c856
child 9246 14265864e804
(svn r12445) -Fix: Add missing compile asserts for window data structs
src/genworld_gui.cpp
src/newgrf_gui.cpp
src/signs_gui.cpp
--- a/src/genworld_gui.cpp	Thu Mar 27 15:46:58 2008 +0000
+++ b/src/genworld_gui.cpp	Thu Mar 27 15:48:54 2008 +0000
@@ -48,6 +48,7 @@
 	uint y;
 	char name[64];
 };
+assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(generate_d));
 
 extern void SwitchMode(int new_mode);
 
--- a/src/newgrf_gui.cpp	Thu Mar 27 15:46:58 2008 +0000
+++ b/src/newgrf_gui.cpp	Thu Mar 27 15:48:54 2008 +0000
@@ -114,6 +114,7 @@
 	GRFConfig **list;
 	const GRFConfig *sel;
 };
+assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(newgrf_add_d));
 
 /* Names of the add a newgrf window widgets */
 enum AddNewGRFWindowWidgets {
--- a/src/signs_gui.cpp	Thu Mar 27 15:46:58 2008 +0000
+++ b/src/signs_gui.cpp	Thu Mar 27 15:48:54 2008 +0000
@@ -163,6 +163,7 @@
 struct editsign_d : querystr_d {
 	SignID cur_sign;
 };
+assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(editsign_d));
 
 enum QueryEditSignWidgets {
 	QUERY_EDIT_SIGN_WIDGET_TEXT = 3,