From ffe07b929283461b2bc3bf8bd92d2f4dba4fb985 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 27 Mar 2008 15:48:54 +0000 Subject: [PATCH] (svn r12445) -Fix: Add missing compile asserts for window data structs --- src/genworld_gui.cpp | 1 + src/newgrf_gui.cpp | 1 + src/signs_gui.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 1db28208f8..65ae872870 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 f153caceda..7c44be08e7 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 bf737455e8..ce533954c4 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,