}
/** Base directories for external debug files */
-static const char* debug_paths[] = {
+static constexpr auto debug_paths = {
"/usr/lib/debug/",
"/usr/local/lib/debug/",
};
* @return the equivalent as a readable string
*/
const char *__get_state_name(e_SD_task_state_t state){
- static std::array<const char*, 7> state_names{
+ static constexpr std::array<const char*, 7> state_names{
{"not scheduled", "schedulable", "scheduled", "runnable", "running", "done", "failed"}};
return state_names.at(static_cast<int>(log2(static_cast<double>(state))));
}
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
/** @brief Simcalls' names (generated from src/simix/simcalls.in) */
-const std::array<const char*, NUM_SIMCALLS> simcall_names{{
+constexpr std::array<const char*, NUM_SIMCALLS> simcall_names{{
"SIMCALL_NONE",
"SIMCALL_EXECUTION_WAITANY_FOR",
"SIMCALL_COMM_SEND",
fd.write(
'/** @brief Simcalls\' names (generated from src/simix/simcalls.in) */\n')
- fd.write('const std::array<const char*, NUM_SIMCALLS> simcall_names{{\n')
+ fd.write('constexpr std::array<const char*, NUM_SIMCALLS> simcall_names{{\n')
fd.write(' "SIMCALL_NONE",\n')
handle(fd, Simcall.string, simcalls, simcalls_dict)
static std::vector<xbt_log_setting_t> xbt_log_settings;
-const std::array<const char*, 8> xbt_log_priority_names{
+constexpr std::array<const char*, 8> xbt_log_priority_names{
{"NONE", "TRACE", "DEBUG", "VERBOSE", "INFO", "WARNING", "ERROR", "CRITICAL"}};
s_xbt_log_category_t _XBT_LOGV(XBT_LOG_ROOT_CAT) = {