comparison src/graph_gui.cpp @ 12927:950767ea4ee5 draft

(svn r17420) -Codechange: replace assert() by assert_compile() where possible
author smatz <smatz@openttd.org>
date Fri, 04 Sep 2009 23:02:52 +0000
parents 6e3b759a3b58
children 6266831f418a
comparison
equal deleted inserted replaced
12926:fb762288aac2 12927:950767ea4ee5
211 OverflowSafeInt64 highest_value; ///< Highest value to be drawn. 211 OverflowSafeInt64 highest_value; ///< Highest value to be drawn.
212 int x_axis_offset; ///< Distance from the top of the graph to the x axis. 212 int x_axis_offset; ///< Distance from the top of the graph to the x axis.
213 213
214 /* the colours and cost array of GraphDrawer must accomodate 214 /* the colours and cost array of GraphDrawer must accomodate
215 * both values for cargo and companies. So if any are higher, quit */ 215 * both values for cargo and companies. So if any are higher, quit */
216 assert(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_COMPANIES); 216 assert_compile(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_COMPANIES);
217 assert(this->num_vert_lines > 0); 217 assert(this->num_vert_lines > 0);
218 218
219 byte grid_colour = _colour_gradient[COLOUR_GREY][4]; 219 byte grid_colour = _colour_gradient[COLOUR_GREY][4];
220 220
221 /* The coordinates of the opposite edges of the graph. */ 221 /* The coordinates of the opposite edges of the graph. */
1242 STR_PERFORMANCE_DETAIL_MONEY_TOOLTIP, 1242 STR_PERFORMANCE_DETAIL_MONEY_TOOLTIP,
1243 STR_PERFORMANCE_DETAIL_LOAN_TOOLTIP, 1243 STR_PERFORMANCE_DETAIL_LOAN_TOOLTIP,
1244 STR_PERFORMANCE_DETAIL_TOTAL_TOOLTIP, 1244 STR_PERFORMANCE_DETAIL_TOTAL_TOOLTIP,
1245 }; 1245 };
1246 1246
1247 assert(lengthof(performance_tips) == SCORE_END - SCORE_BEGIN); 1247 assert_compile(lengthof(performance_tips) == SCORE_END - SCORE_BEGIN);
1248 1248
1249 NWidgetVertical *vert = new NWidgetVertical(); 1249 NWidgetVertical *vert = new NWidgetVertical();
1250 for (int widnum = PRW_SCORE_FIRST; widnum <= PRW_SCORE_LAST; widnum++) { 1250 for (int widnum = PRW_SCORE_FIRST; widnum <= PRW_SCORE_LAST; widnum++) {
1251 NWidgetBackground *panel = new NWidgetBackground(WWT_PANEL, COLOUR_GREY, widnum); 1251 NWidgetBackground *panel = new NWidgetBackground(WWT_PANEL, COLOUR_GREY, widnum);
1252 panel->SetMinimalSize(299, 20); 1252 panel->SetMinimalSize(299, 20);