diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-21 22:34:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-21 22:34:49 +0100 |
| commit | 2935d9d158cf35496a35107f9c4ab7d2929cf6c3 (patch) | |
| tree | ded31322feaf0279962127ab45e072b4bc3c1f72 /src/lib/log.cc | |
| parent | fc888176a978d11e9d5487d3afce33cdf92e1342 (diff) | |
Try to fix clashes caused by ERROR, WARNING etc. as variables.
Diffstat (limited to 'src/lib/log.cc')
| -rw-r--r-- | src/lib/log.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/log.cc b/src/lib/log.cc index be32315d1..a2f420ce1 100644 --- a/src/lib/log.cc +++ b/src/lib/log.cc @@ -34,10 +34,10 @@ using namespace std; using boost::algorithm::is_any_of; using boost::algorithm::split; -int const Log::GENERAL = 0x1; -int const Log::WARNING = 0x2; -int const Log::ERROR = 0x4; -int const Log::TIMING = 0x8; +int const Log::TYPE_GENERAL = 0x1; +int const Log::TYPE_WARNING = 0x2; +int const Log::TYPE_ERROR = 0x4; +int const Log::TYPE_TIMING = 0x8; Log::Log () : _types (0) @@ -69,11 +69,11 @@ Log::log (string message, int type) stringstream s; s << a.substr (0, a.length() - 1) << N_(": "); - if (type & ERROR) { + if (type & TYPE_ERROR) { s << "ERROR: "; } - if (type & WARNING) { + if (type & TYPE_WARNING) { s << "WARNING: "; } @@ -118,13 +118,13 @@ Log::set_types (string t) for (vector<string>::const_iterator i = types.begin(); i != types.end(); ++i) { if (*i == N_("general")) { - _types |= GENERAL; + _types |= TYPE_GENERAL; } else if (*i == N_("warning")) { - _types |= WARNING; + _types |= TYPE_WARNING; } else if (*i == N_("error")) { - _types |= ERROR; + _types |= TYPE_ERROR; } else if (*i == N_("timing")) { - _types |= TIMING; + _types |= TYPE_TIMING; } } } |
