From e8c4b6eb11149b0723b713b7d027048d1bfd6625 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Tue, 26 Jul 2022 14:05:59 +0200 Subject: [PATCH] Util: Rename formatting danger -> critical --- src/util/format/format.cpp | 12 ++++++------ src/util/format/format.h | 28 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/util/format/format.cpp b/src/util/format/format.cpp index 694932c..dbb6517 100644 --- a/src/util/format/format.cpp +++ b/src/util/format/format.cpp @@ -60,7 +60,7 @@ void prettyVariadicFormat(Type type, bool bold, std::string_view format, TypeEra case Type::Warn: stream << "33"; break; - case Type::Danger: + case Type::Critital: stream << "31"; break; case Type::Success: @@ -105,7 +105,7 @@ Dbg::Dbg(Type type, bool bold) case Type::Warn: m_stream << "33"; break; - case Type::Danger: + case Type::Critical: m_stream << "31"; break; case Type::Success: @@ -164,14 +164,14 @@ Dbg warnb() return Dbg(Type::Warn, true); } -Dbg danger() +Dbg critical() { - return Dbg(Type::Danger, false); + return Dbg(Type::Critical, false); } -Dbg dangerb() +Dbg criticalb() { - return Dbg(Type::Danger, true); + return Dbg(Type::Critical, true); } Dbg success() diff --git a/src/util/format/format.h b/src/util/format/format.h index 24aadea..6bb1dd6 100644 --- a/src/util/format/format.h +++ b/src/util/format/format.h @@ -65,12 +65,12 @@ void variadicFormat(std::stringstream& stream, std::string_view format, TypeEras // ----------------------------------------- enum class Type { - None, // Foreground - Info, // Blue - Warn, // Yellow - Danger, // Red - Success, // Green - Comment, // White + None, // Foreground + Info, // Blue + Warn, // Yellow + Critical, // Red + Success, // Green + Comment, // White }; void prettyVariadicFormat(Type type, bool bold, std::string_view format, TypeErasedParameters& parameters); @@ -89,8 +89,8 @@ FORMAT_FUNCTION(infoln, Info, false); FORMAT_FUNCTION(infobln, Info, true); FORMAT_FUNCTION(warnln, Warn, false); FORMAT_FUNCTION(warnbln, Warn, true); -FORMAT_FUNCTION(dangerln, Danger, false); -FORMAT_FUNCTION(dangerbln, Danger, true); +FORMAT_FUNCTION(criticalln, Critical, false); +FORMAT_FUNCTION(criticalbln, Critical, true); FORMAT_FUNCTION(successln, Success, false); FORMAT_FUNCTION(successbln, Success, true); FORMAT_FUNCTION(commentln, Comment, false); @@ -126,8 +126,8 @@ Dbg info(); Dbg infob(); Dbg warn(); Dbg warnb(); -Dbg danger(); -Dbg dangerb(); +Dbg critical(); +Dbg criticalb(); Dbg success(); Dbg successb(); Dbg comment(); @@ -171,8 +171,8 @@ Str str(std::string& fill); using Util::Format::commentbln; using Util::Format::commentln; -using Util::Format::dangerbln; -using Util::Format::dangerln; +using Util::Format::criticalbln; +using Util::Format::criticalln; using Util::Format::dbgbln; using Util::Format::dbgln; using Util::Format::infobln; @@ -184,8 +184,8 @@ using Util::Format::warnln; using Util::Format::comment; using Util::Format::commentb; -using Util::Format::danger; -using Util::Format::dangerb; +using Util::Format::critical; +using Util::Format::criticalb; using Util::Format::dbg; using Util::Format::dbgb; using Util::Format::info;