summaryrefslogtreecommitdiff
path: root/src/graph_gui.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2020-12-27 10:44:22 +0000
committerCharles Pigott <charlespigott@googlemail.com>2020-12-27 10:55:42 +0000
commit860c270c73048b4930ac8cbebcd60be746eb9782 (patch)
treea88a8acb208cf426ae8fac05dda202c57b59426a /src/graph_gui.cpp
parent395a5d9991b500c681ff384f8d3b4e153e687abb (diff)
downloadopenttd-860c270c73048b4930ac8cbebcd60be746eb9782.tar.xz
Codechange: Replace assert_compile macro with static_assert
Diffstat (limited to 'src/graph_gui.cpp')
-rw-r--r--src/graph_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index d454d8a9b..3d6d2a3a3 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -289,7 +289,7 @@ protected:
/* the colours and cost array of GraphDrawer must accommodate
* both values for cargo and companies. So if any are higher, quit */
- assert_compile(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_COMPANIES);
+ static_assert(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_COMPANIES);
assert(this->num_vert_lines > 0);
byte grid_colour = _colour_gradient[COLOUR_GREY][4];
@@ -1527,7 +1527,7 @@ static NWidgetBase *MakePerformanceDetailPanels(int *biggest_index)
STR_PERFORMANCE_DETAIL_TOTAL_TOOLTIP,
};
- assert_compile(lengthof(performance_tips) == SCORE_END - SCORE_BEGIN);
+ static_assert(lengthof(performance_tips) == SCORE_END - SCORE_BEGIN);
NWidgetVertical *vert = new NWidgetVertical(NC_EQUALSIZE);
for (int widnum = WID_PRD_SCORE_FIRST; widnum <= WID_PRD_SCORE_LAST; widnum++) {