From 07bdf56a2ba5130c824454e6e24d935875d5f932 Mon Sep 17 00:00:00 2001 From: leozide Date: Fri, 14 Apr 2017 16:45:55 -0700 Subject: [PATCH] Static assert compiler test. --- common/lc_commands.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lc_commands.cpp b/common/lc_commands.cpp index 6ab9e13d..0574e1a7 100644 --- a/common/lc_commands.cpp +++ b/common/lc_commands.cpp @@ -1434,7 +1434,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] = } }; -LC_CASSERT(sizeof(gCommands)/sizeof(gCommands[0]) == LC_NUM_COMMANDS); +static_assert(sizeof(gCommands)/sizeof(gCommands[0]) == LC_NUM_COMMANDS, "Array size mismatch."); const char* gToolNames[LC_NUM_TOOLS] = { @@ -1454,4 +1454,4 @@ const char* gToolNames[LC_NUM_TOOLS] = QT_TRANSLATE_NOOP("Mouse", "ZoomRegion") // LC_TOOL_ZOOM_REGION }; -LC_CASSERT(sizeof(gToolNames) / sizeof(gToolNames[0]) == LC_NUM_TOOLS); +static_assert(sizeof(gToolNames) / sizeof(gToolNames[0]) == LC_NUM_TOOLS, "Array size mismatch.");