Refactoring: use enum class

This commit is contained in:
amai2012 2019-07-29 21:05:09 +02:00
parent 3ad9d6a1ad
commit 24ad434c52
2 changed files with 5 additions and 5 deletions

View File

@ -485,12 +485,12 @@ void ThreadExecutor::reportOut(const std::string &outmsg)
}
void ThreadExecutor::reportErr(const ErrorLogger::ErrorMessage &msg)
{
report(msg, REPORT_ERROR);
report(msg, MessageType::REPORT_ERROR);
}
void ThreadExecutor::reportInfo(const ErrorLogger::ErrorMessage &msg)
{
report(msg, REPORT_INFO);
report(msg, MessageType::REPORT_INFO);
}
void ThreadExecutor::report(const ErrorLogger::ErrorMessage &msg, MessageType msgType)
@ -513,10 +513,10 @@ void ThreadExecutor::report(const ErrorLogger::ErrorMessage &msg, MessageType ms
EnterCriticalSection(&mReportSync);
switch (msgType) {
case REPORT_ERROR:
case MessageType::REPORT_ERROR:
mErrorLogger.reportErr(msg);
break;
case REPORT_INFO:
case MessageType::REPORT_INFO:
mErrorLogger.reportInfo(msg);
break;
}

View File

@ -110,7 +110,7 @@ public:
#elif defined(THREADING_MODEL_WIN)
private:
enum MessageType {REPORT_ERROR, REPORT_INFO};
enum class MessageType {REPORT_ERROR, REPORT_INFO};
std::map<std::string, std::string> mFileContents;
std::map<std::string, std::size_t>::const_iterator mItNextFile;