diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-19 10:25:38 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-19 10:25:38 +0000 |
| commit | 0189bbc6bc727d161b9adcd2fa82f6c573bbf0a7 (patch) | |
| tree | 9ac9851562949b00e241fbed96358791338910c2 /src/LogFactory.cc | |
| parent | e59f4f2fe3280b86c76fe5424d171e3e33113beb (diff) | |
2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Defined option name and possible values as std::string to reduce
temporary string object creation in runtime.
* src/HelpItemFactory.cc
* src/LogFactory.cc
* src/Option.cc
* src/OptionHandlerFactory.cc
* src/option_processing.cc
* src/prefs.cc
* src/prefs.h
Diffstat (limited to 'src/LogFactory.cc')
| -rw-r--r-- | src/LogFactory.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/LogFactory.cc b/src/LogFactory.cc index e67487eb..baaf42dd 100644 --- a/src/LogFactory.cc +++ b/src/LogFactory.cc @@ -67,15 +67,15 @@ void LogFactory::setLogLevel(Logger::LEVEL level) void LogFactory::setLogLevel(const std::string& level) { - if(strcmp(level.c_str(), V_DEBUG) == 0) { + if(level == V_DEBUG) { _logLevel = Logger::DEBUG; - } else if(strcmp(level.c_str(), V_INFO) == 0) { + } else if(level == V_INFO) { _logLevel = Logger::INFO; - } else if(strcmp(level.c_str(), V_NOTICE) == 0) { + } else if(level == V_NOTICE) { _logLevel = Logger::NOTICE; - } else if(strcmp(level.c_str(), V_WARN) == 0) { + } else if(level == V_WARN) { _logLevel = Logger::WARN; - } else if(strcmp(level.c_str(), V_ERROR) == 0) { + } else if(level == V_ERROR) { _logLevel = Logger::ERROR; } } |
