diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-04-08 23:53:47 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-04-08 23:53:47 +0200 |
| commit | e85a966df4087d451f7e4e1810f4076bb5e81603 (patch) | |
| tree | af840b73bc53d6389e0071611ba9a148825e88ac | |
| parent | f06ad30918394cf1fdd614b2c8403752841adc51 (diff) | |
White space: log.{cc,h}
| -rw-r--r-- | src/lib/log.cc | 26 | ||||
| -rw-r--r-- | src/lib/log.h | 22 |
2 files changed, 24 insertions, 24 deletions
diff --git a/src/lib/log.cc b/src/lib/log.cc index aae492faf..e5d1a8206 100644 --- a/src/lib/log.cc +++ b/src/lib/log.cc @@ -40,30 +40,30 @@ using std::shared_ptr; using std::string; -Log::Log () +Log::Log() { } void -Log::log (shared_ptr<const LogEntry> e) +Log::log(shared_ptr<const LogEntry> e) { - boost::mutex::scoped_lock lm (_mutex); + boost::mutex::scoped_lock lm(_mutex); if ((_types & e->type()) == 0) { return; } - do_log (e); + do_log(e); } /** @param n String to log */ void -Log::log (string message, int type) +Log::log(string message, int type) { - boost::mutex::scoped_lock lm (_mutex); + boost::mutex::scoped_lock lm(_mutex); if ((_types & type) == 0) { return; @@ -71,30 +71,30 @@ Log::log (string message, int type) auto e = make_shared<StringLogEntry>(type, message); - do_log (e); + do_log(e); } void -Log::dcp_log (dcp::NoteType type, string m) +Log::dcp_log(dcp::NoteType type, string m) { switch (type) { case dcp::NoteType::PROGRESS: - do_log (make_shared<StringLogEntry>(LogEntry::TYPE_GENERAL, m)); + do_log(make_shared<StringLogEntry>(LogEntry::TYPE_GENERAL, m)); break; case dcp::NoteType::ERROR: - do_log (make_shared<StringLogEntry>(LogEntry::TYPE_ERROR, m)); + do_log(make_shared<StringLogEntry>(LogEntry::TYPE_ERROR, m)); break; case dcp::NoteType::NOTE: - do_log (make_shared<StringLogEntry>(LogEntry::TYPE_WARNING, m)); + do_log(make_shared<StringLogEntry>(LogEntry::TYPE_WARNING, m)); break; } } void -Log::set_types (int t) +Log::set_types(int t) { - boost::mutex::scoped_lock lm (_mutex); + boost::mutex::scoped_lock lm(_mutex); _types = t; } diff --git a/src/lib/log.h b/src/lib/log.h index c6685bda1..e372e618f 100644 --- a/src/lib/log.h +++ b/src/lib/log.h @@ -45,25 +45,25 @@ LIBDCP_ENABLE_WARNINGS class Log { public: - Log (); - virtual ~Log () {} + Log(); + virtual ~Log() {} - Log (Log const&) = delete; - Log& operator= (Log const&) = delete; + Log(Log const&) = delete; + Log& operator=(Log const&) = delete; - void log (std::shared_ptr<const LogEntry> entry); - void log (std::string message, int type); - void dcp_log (dcp::NoteType type, std::string message); + void log(std::shared_ptr<const LogEntry> entry); + void log(std::string message, int type); + void dcp_log(dcp::NoteType type, std::string message); - void set_types (int types); - int types () const { + void set_types(int types); + int types() const { return _types; } /** @param amount Approximate number of bytes to return; the returned value * may be shorter or longer than this. */ - virtual std::string head_and_tail (int amount = 1024) const { + virtual std::string head_and_tail(int amount = 1024) const { (void) amount; return ""; } @@ -74,7 +74,7 @@ protected: mutable boost::mutex _mutex; private: - virtual void do_log (std::shared_ptr<const LogEntry> entry) = 0; + virtual void do_log(std::shared_ptr<const LogEntry> entry) = 0; /** bit-field of log types which should be put into the log (others are ignored) */ int _types = 0; |
