Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update loglevels.hpp #496

Merged
merged 2 commits into from
May 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions src/g3log/loglevels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ struct LEVELS {

LEVELS(const LEVELS& other): value(other.value), text(other.text.c_str()) {}

#if __cplusplus >= 202002L
constexpr
#endif
LEVELS(int id, const std::string& idtext) : value(id), text(idtext) {}

bool operator==(const LEVELS& rhs) const {
Expand Down Expand Up @@ -94,11 +91,7 @@ namespace g3 {
static const int kInternalFatalValue = 2000;
} // g3

#if __cplusplus >= 202002L
constexpr
#else
const
#endif
const
CryptoManiac marked this conversation as resolved.
Show resolved Hide resolved
LEVELS G3LOG_DEBUG{g3::kDebugValue, "DEBUG"},
INFO {g3::kInfoValue, "INFO"},
WARNING {g3::kWarningValue, "WARNING"},
Expand Down Expand Up @@ -137,11 +130,7 @@ namespace g3 {

namespace g3 {
namespace internal {
#if __cplusplus >= 202002L
constexpr
#else
const
#endif
const
CryptoManiac marked this conversation as resolved.
Show resolved Hide resolved
LEVELS CONTRACT {g3::kInternalFatalValue, {"CONTRACT"}},
FATAL_SIGNAL {g3::kInternalFatalValue + 1, {"FATAL_SIGNAL"}},
FATAL_EXCEPTION {kInternalFatalValue + 2, {"FATAL_EXCEPTION"}};
Expand Down