mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Replace the old STATIC_ASSERT macro with static_assert
This commit is contained in:
parent
8b108ed5f2
commit
9c348d057e
4 changed files with 8 additions and 20 deletions
|
@ -111,8 +111,8 @@ static unsigned int g_level_to_android[] = {
|
|||
};
|
||||
|
||||
void AndroidLogOutput::logRaw(LogLevel lev, const std::string &line) {
|
||||
STATIC_ASSERT(ARRLEN(g_level_to_android) == LL_MAX,
|
||||
mismatch_between_android_and_internal_loglevels);
|
||||
static_assert(ARRLEN(g_level_to_android) == LL_MAX,
|
||||
"mismatch between android and internal loglevels");
|
||||
__android_log_print(g_level_to_android[lev],
|
||||
PROJECT_NAME_C, "%s", line.c_str());
|
||||
}
|
||||
|
@ -226,8 +226,8 @@ const std::string Logger::getLevelLabel(LogLevel lev)
|
|||
"TRACE",
|
||||
};
|
||||
assert(lev < LL_MAX && lev >= 0);
|
||||
STATIC_ASSERT(ARRLEN(names) == LL_MAX,
|
||||
mismatch_between_loglevel_names_and_enum);
|
||||
static_assert(ARRLEN(names) == LL_MAX,
|
||||
"mismatch between loglevel names and enum");
|
||||
return names[lev];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue