From 24ad434c5260f8655d1beb0c4120c67527f620d3 Mon Sep 17 00:00:00 2001 From: amai2012 Date: Mon, 29 Jul 2019 21:05:09 +0200 Subject: [PATCH] Refactoring: use enum class --- cli/threadexecutor.cpp | 8 ++++---- cli/threadexecutor.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index d4a02f4b7..0d99db9f0 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -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; } diff --git a/cli/threadexecutor.h b/cli/threadexecutor.h index ef432858f..788d13258 100644 --- a/cli/threadexecutor.h +++ b/cli/threadexecutor.h @@ -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 mFileContents; std::map::const_iterator mItNextFile;