summaryrefslogtreecommitdiff
path: root/louloulibs/utils/timed_events.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-05-04 14:16:40 +0200
committerlouiz’ <louiz@louiz.org>2016-05-04 14:16:40 +0200
commitaf42073830087d97385e507f27f601e8769541b0 (patch)
treed7187f5dcbf73cf73776c6c9dad01ad4d0a25b51 /louloulibs/utils/timed_events.hpp
parent305e01c0b58ec5cfee276841488f9c24835ce923 (diff)
downloadbiboumi-af42073830087d97385e507f27f601e8769541b0.tar.gz
biboumi-af42073830087d97385e507f27f601e8769541b0.tar.bz2
biboumi-af42073830087d97385e507f27f601e8769541b0.tar.xz
biboumi-af42073830087d97385e507f27f601e8769541b0.zip
Style fix
Move all constructors at the top of classes
Diffstat (limited to 'louloulibs/utils/timed_events.hpp')
-rw-r--r--louloulibs/utils/timed_events.hpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/louloulibs/utils/timed_events.hpp b/louloulibs/utils/timed_events.hpp
index 4e2800c..c3dfc40 100644
--- a/louloulibs/utils/timed_events.hpp
+++ b/louloulibs/utils/timed_events.hpp
@@ -31,7 +31,12 @@ public:
std::function<void()> callback, const std::string& name="");
explicit TimedEvent(TimedEvent&&);
- ~TimedEvent();
+ ~TimedEvent() = default;
+
+ TimedEvent(const TimedEvent&) = delete;
+ TimedEvent& operator=(const TimedEvent&) = delete;
+ TimedEvent& operator=(TimedEvent&&) = delete;
+
/**
* Whether or not this event happens after the other one.
*/
@@ -70,10 +75,6 @@ private:
* unique.
*/
const std::string name;
-
- TimedEvent(const TimedEvent&) = delete;
- TimedEvent& operator=(const TimedEvent&) = delete;
- TimedEvent& operator=(TimedEvent&&) = delete;
};
/**
@@ -84,7 +85,13 @@ private:
class TimedEventsManager
{
public:
- ~TimedEventsManager();
+ ~TimedEventsManager() = default;
+
+ TimedEventsManager(const TimedEventsManager&) = delete;
+ TimedEventsManager(TimedEventsManager&&) = delete;
+ TimedEventsManager& operator=(const TimedEventsManager&) = delete;
+ TimedEventsManager& operator=(TimedEventsManager&&) = delete;
+
/**
* Return the unique instance of this class
*/
@@ -121,12 +128,8 @@ public:
std::size_t size() const;
private:
- explicit TimedEventsManager();
std::list<TimedEvent> events;
- TimedEventsManager(const TimedEventsManager&) = delete;
- TimedEventsManager(TimedEventsManager&&) = delete;
- TimedEventsManager& operator=(const TimedEventsManager&) = delete;
- TimedEventsManager& operator=(TimedEventsManager&&) = delete;
+ explicit TimedEventsManager() = default;
};
#endif // TIMED_EVENTS_HPP