From f51e9c758a39932625a52ebecc9e3c6f8b807cfd Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 31 Dec 2025 22:33:31 +0100 Subject: White space: event_history.{cc,h} --- src/lib/event_history.cc | 22 +++++++++++----------- src/lib/event_history.h | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/lib') diff --git a/src/lib/event_history.cc b/src/lib/event_history.cc index fca88aaf1..f68a6c9b9 100644 --- a/src/lib/event_history.cc +++ b/src/lib/event_history.cc @@ -27,37 +27,37 @@ using boost::optional; -EventHistory::EventHistory (int size) - : _size (size) +EventHistory::EventHistory(int size) + : _size(size) { } optional -EventHistory::rate () const +EventHistory::rate() const { - boost::mutex::scoped_lock lock (_mutex); + boost::mutex::scoped_lock lock(_mutex); if (int(_history.size()) < _size) { return {}; } struct timeval now; - gettimeofday (&now, 0); + gettimeofday(&now, 0); - return _size / (seconds (now) - seconds (_history.back ())); + return _size / (seconds(now) - seconds(_history.back())); } void -EventHistory::event () +EventHistory::event() { - boost::mutex::scoped_lock lock (_mutex); + boost::mutex::scoped_lock lock(_mutex); struct timeval tv; - gettimeofday (&tv, 0); - _history.push_front (tv); + gettimeofday(&tv, 0); + _history.push_front(tv); if (int(_history.size()) > _size) { - _history.pop_back (); + _history.pop_back(); } } diff --git a/src/lib/event_history.h b/src/lib/event_history.h index a98447f42..63329fa0e 100644 --- a/src/lib/event_history.h +++ b/src/lib/event_history.h @@ -23,18 +23,18 @@ #define DCPOMATIC_EVENT_HISTORY_H -#include #include +#include #include class EventHistory { public: - explicit EventHistory (int size); + explicit EventHistory(int size); - boost::optional rate () const; - void event (); + boost::optional rate() const; + void event(); private: /** Mutex for _history */ -- cgit v1.2.3