Renamed LogSeverity Symbols, like.. LogSeveritySuccess from Succuess to avoid conflicts with macros such as those in X11 header.

This commit is contained in:
Syphurith 2015-05-22 20:16:30 +08:00
parent 2a7c65c019
commit 5a6869fc5e
3 changed files with 24 additions and 24 deletions

View file

@ -57,7 +57,7 @@ LogChannel::LogChannel() : LogChannel("unknown")
LogChannel::LogChannel(const std::string& name) :
name(name)
, mEnabled(true)
, mLogLevel(Warning)
, mLogLevel(LogSeverityWarning)
{}
void LogChannel::log(const LogMessage &msg)
@ -186,16 +186,16 @@ void LogManager::log(LogMessage msg)
std::string prefix;
switch (msg.mServerity)
{
case Success:
case LogSeveritySuccess:
prefix = "S ";
break;
case Notice:
case LogSeverityNotice:
prefix = "! ";
break;
case Warning:
case LogSeverityWarning:
prefix = "W ";
break;
case Error:
case LogSeverityError:
prefix = "E ";
break;
}
@ -265,12 +265,12 @@ void log_message(Log::LogType type, Log::LogSeverity sev, std::string text)
else
{
rMessageBox(text,
sev == Notice ? "Notice" :
sev == Warning ? "Warning" :
sev == Success ? "Success" :
sev == Error ? "Error" : "Unknown",
sev == Notice ? rICON_INFORMATION :
sev == Warning ? rICON_EXCLAMATION :
sev == Error ? rICON_ERROR : rICON_INFORMATION);
sev == LogSeverityNotice ? "Notice" :
sev == LogSeverityWarning ? "Warning" :
sev == LogSeveritySuccess ? "Success" :
sev == LogSeverityError ? "Error" : "Unknown",
sev == LogSeverityNotice ? rICON_INFORMATION :
sev == LogSeverityWarning ? rICON_EXCLAMATION :
sev == LogSeverityError ? rICON_ERROR : rICON_INFORMATION);
}
}