Static assert compiler test.

This commit is contained in:
leozide 2017-04-14 16:45:55 -07:00
parent dc7f640bc9
commit 07bdf56a2b

View file

@ -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.");