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 | |
| parent | fc888176a978d11e9d5487d3afce33cdf92e1342 (diff) | |
Try to fix clashes caused by ERROR, WARNING etc. as variables.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/config.cc | 4 | ||||
| -rw-r--r-- | src/lib/cross.cc | 4 | ||||
| -rw-r--r-- | src/lib/dcp_video_frame.cc | 2 | ||||
| -rw-r--r-- | src/lib/encoder.cc | 6 | ||||
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 2 | ||||
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 6 | ||||
| -rw-r--r-- | src/lib/film.cc | 4 | ||||
| -rw-r--r-- | src/lib/image_proxy.cc | 2 | ||||
| -rw-r--r-- | src/lib/log.cc | 20 | ||||
| -rw-r--r-- | src/lib/log.h | 8 | ||||
| -rw-r--r-- | src/lib/player.cc | 2 | ||||
| -rw-r--r-- | src/lib/scp_dcp_job.cc | 2 | ||||
| -rw-r--r-- | src/lib/server.cc | 8 | ||||
| -rw-r--r-- | src/lib/transcode_job.cc | 4 | ||||
| -rw-r--r-- | src/lib/writer.cc | 6 |
15 files changed, 40 insertions, 40 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 6d029dd1f..b97ad559d 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -73,7 +73,7 @@ Config::Config () , _check_for_updates (false) , _check_for_test_updates (false) , _maximum_j2k_bandwidth (250000000) - , _log_types (Log::GENERAL | Log::WARNING | Log::ERROR) + , _log_types (Log::TYPE_GENERAL | Log::TYPE_WARNING | Log::TYPE_ERROR) { _allowed_dcp_frame_rates.push_back (24); _allowed_dcp_frame_rates.push_back (25); @@ -191,7 +191,7 @@ Config::read () _maximum_j2k_bandwidth = f.optional_number_child<int> ("MaximumJ2KBandwidth").get_value_or (250000000); _allow_any_dcp_frame_rate = f.optional_bool_child ("AllowAnyDCPFrameRate"); - _log_types = f.optional_number_child<int> ("LogTypes").get_value_or (Log::GENERAL | Log::WARNING | Log::ERROR); + _log_types = f.optional_number_child<int> ("LogTypes").get_value_or (Log::TYPE_GENERAL | Log::TYPE_WARNING | Log::TYPE_ERROR); } void diff --git a/src/lib/cross.cc b/src/lib/cross.cc index 9247baa97..730cfe1d0 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -46,8 +46,8 @@ #include "i18n.h" -#define LOG_GENERAL(...) log->log (String::compose (__VA_ARGS__), Log::GENERAL); -#define LOG_ERROR(...) log->log (String::compose (__VA_ARGS__), Log::ERROR); +#define LOG_GENERAL(...) log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); +#define LOG_ERROR(...) log->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR); using std::pair; using std::list; diff --git a/src/lib/dcp_video_frame.cc b/src/lib/dcp_video_frame.cc index 265cbaae8..6cf987648 100644 --- a/src/lib/dcp_video_frame.cc +++ b/src/lib/dcp_video_frame.cc @@ -63,7 +63,7 @@ #include "cross.h" #include "player_video_frame.h" -#define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::GENERAL); +#define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); #include "i18n.h" diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index 05da6bbdf..ee43476c9 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -39,9 +39,9 @@ #include "i18n.h" -#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL); -#define LOG_ERROR(...) _film->log()->log (String::compose (__VA_ARGS__), Log::ERROR); -#define LOG_TIMING(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TIMING); +#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); +#define LOG_ERROR(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR); +#define LOG_TIMING(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_TIMING); using std::pair; using std::string; diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 5d0a6a309..41a3724a2 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -34,7 +34,7 @@ extern "C" { #include "i18n.h" -#define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL); +#define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); using std::string; using std::stringstream; diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 6351c7e22..5fe34ce14 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -46,9 +46,9 @@ extern "C" { #include "i18n.h" -#define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL); -#define LOG_ERROR(...) film->log()->log (String::compose (__VA_ARGS__), Log::ERROR); -#define LOG_WARNING(...) film->log()->log (__VA_ARGS__, Log::WARNING); +#define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); +#define LOG_ERROR(...) film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR); +#define LOG_WARNING(...) film->log()->log (__VA_ARGS__, Log::TYPE_WARNING); using std::cout; using std::string; diff --git a/src/lib/film.cc b/src/lib/film.cc index 206400da2..5fde0447a 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -81,8 +81,8 @@ using libdcp::Size; using libdcp::Signer; using libdcp::raw_convert; -#define LOG_GENERAL(...) log()->log (String::compose (__VA_ARGS__), Log::GENERAL); -#define LOG_GENERAL_NC(...) log()->log (__VA_ARGS__, Log::GENERAL); +#define LOG_GENERAL(...) log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); +#define LOG_GENERAL_NC(...) log()->log (__VA_ARGS__, Log::TYPE_GENERAL); /* 5 -> 6 * AudioMapping XML changed. diff --git a/src/lib/image_proxy.cc b/src/lib/image_proxy.cc index c0e75c77c..ec5b66555 100644 --- a/src/lib/image_proxy.cc +++ b/src/lib/image_proxy.cc @@ -28,7 +28,7 @@ #include "i18n.h" -#define LOG_TIMING(...) _log->microsecond_log (String::compose (__VA_ARGS__), Log::TIMING); +#define LOG_TIMING(...) _log->microsecond_log (String::compose (__VA_ARGS__), Log::TYPE_TIMING); using std::cout; using std::string; 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; } } } diff --git a/src/lib/log.h b/src/lib/log.h index 641ce186d..c11daf617 100644 --- a/src/lib/log.h +++ b/src/lib/log.h @@ -37,10 +37,10 @@ public: Log (); virtual ~Log () {} - static const int GENERAL; - static const int WARNING; - static const int ERROR; - static const int TIMING; + static const int TYPE_GENERAL; + static const int TYPE_WARNING; + static const int TYPE_ERROR; + static const int TYPE_TIMING; void log (std::string message, int type); void microsecond_log (std::string message, int type); diff --git a/src/lib/player.cc b/src/lib/player.cc index a90350922..b112760ef 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -37,7 +37,7 @@ #include "scaler.h" #include "player_video_frame.h" -#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL); +#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); using std::list; using std::cout; diff --git a/src/lib/scp_dcp_job.cc b/src/lib/scp_dcp_job.cc index 30bfc3441..637840813 100644 --- a/src/lib/scp_dcp_job.cc +++ b/src/lib/scp_dcp_job.cc @@ -37,7 +37,7 @@ #include "i18n.h" -#define LOG_GENERAL_NC(...) _film->log()->microsecond_log (__VA_ARGS__, Log::GENERAL); +#define LOG_GENERAL_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_GENERAL); using std::string; using std::stringstream; diff --git a/src/lib/server.cc b/src/lib/server.cc index c4c98a4c9..6b4064cd7 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -41,10 +41,10 @@ #include "i18n.h" -#define LOG_GENERAL(...) _log->microsecond_log (String::compose (__VA_ARGS__), Log::GENERAL); -#define LOG_GENERAL_NC(...) _log->microsecond_log (__VA_ARGS__, Log::GENERAL); -#define LOG_ERROR(...) _log->microsecond_log (String::compose (__VA_ARGS__), Log::ERROR); -#define LOG_ERROR_NC(...) _log->microsecond_log (__VA_ARGS__, Log::ERROR); +#define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); +#define LOG_GENERAL_NC(...) _log->log (__VA_ARGS__, Log::TYPE_GENERAL); +#define LOG_ERROR(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR); +#define LOG_ERROR_NC(...) _log->log (__VA_ARGS__, Log::TYPE_ERROR); using std::string; using std::stringstream; diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index fb9a59179..ef15f9f5e 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -30,8 +30,8 @@ #include "i18n.h" -#define LOG_GENERAL_NC(...) _film->log()->microsecond_log (__VA_ARGS__, Log::GENERAL); -#define LOG_ERROR_NC(...) _film->log()->microsecond_log (__VA_ARGS__, Log::ERROR); +#define LOG_GENERAL_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_GENERAL); +#define LOG_ERROR_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_ERROR); using std::string; using std::stringstream; diff --git a/src/lib/writer.cc b/src/lib/writer.cc index b058c2801..b175843ed 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -40,9 +40,9 @@ #include "i18n.h" -#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL); -#define LOG_TIMING(...) _film->log()->microsecond_log (String::compose (__VA_ARGS__), Log::TIMING); -#define LOG_WARNING_NC(...) _film->log()->log (__VA_ARGS__, Log::WARNING); +#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); +#define LOG_TIMING(...) _film->log()->microsecond_log (String::compose (__VA_ARGS__), Log::TYPE_TIMING); +#define LOG_WARNING_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_WARNING); /* OS X strikes again */ #undef set_key |
