From fcfc69529c41655dcad759480fc8aa72ef4e30bc Mon Sep 17 00:00:00 2001 From: klayoutmatthias Date: Thu, 9 Nov 2023 22:03:19 +0100 Subject: [PATCH] Fixing a static initialization problem on Windows --- src/db/db/gsiDeclDbLog.cc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/db/db/gsiDeclDbLog.cc b/src/db/db/gsiDeclDbLog.cc index 2593e8c61..d03be1bc3 100644 --- a/src/db/db/gsiDeclDbLog.cc +++ b/src/db/db/gsiDeclDbLog.cc @@ -94,29 +94,29 @@ Class decl_dbNetlistDeviceExtractorError ("db", "LogEntryData" "It was generalized and renamed in version 0.28.13 as it was basically not useful as a separate class." ); -gsi::Enum decl_Severity ("db", "Severity", - gsi::enum_const ("NoSeverity", db::NoSeverity, - "@brief Specifies no particular severity (default)\n" - ) + - gsi::enum_const ("Warning", db::Warning, - "@brief Specifies warning severity (log with high priority, but do not stop)\n" - ) + - gsi::enum_const ("Error", db::Error, - "@brief Specifies error severity (preferred action is stop)\n" - ) + - gsi::enum_const ("Info", db::Info, - "@brief Specifies info severity (print if requested, otherwise silent)\n" - ), - "@brief This enum specifies the severity level for log entries.\n" - "\n" - "This enum was introduced in version 0.28.13.\n" -); - const gsi::Enum &get_decl_Severity () { + static gsi::Enum decl_Severity ("db", "Severity", + gsi::enum_const ("NoSeverity", db::NoSeverity, + "@brief Specifies no particular severity (default)\n" + ) + + gsi::enum_const ("Warning", db::Warning, + "@brief Specifies warning severity (log with high priority, but do not stop)\n" + ) + + gsi::enum_const ("Error", db::Error, + "@brief Specifies error severity (preferred action is stop)\n" + ) + + gsi::enum_const ("Info", db::Info, + "@brief Specifies info severity (print if requested, otherwise silent)\n" + ), + "@brief This enum specifies the severity level for log entries.\n" + "\n" + "This enum was introduced in version 0.28.13.\n" + ); + return decl_Severity; } -gsi::ClassExt inject_SeverityEnum_into_LogEntryData (decl_Severity.defs ()); +gsi::ClassExt inject_SeverityEnum_into_LogEntryData (get_decl_Severity ().defs ()); }