diff --git a/include/icsneo/api/eventcallback.h b/include/icsneo/api/eventcallback.h index 899590b..8ad20ca 100644 --- a/include/icsneo/api/eventcallback.h +++ b/include/icsneo/api/eventcallback.h @@ -11,28 +11,28 @@ namespace icsneo { class EventCallback { public: - typedef std::function< void( std::shared_ptr ) > fn_eventCallback; + typedef std::function< void( std::shared_ptr ) > fn_eventCallback; - EventCallback(fn_eventCallback cb, std::shared_ptr f) : callback(cb), filter(f) {} - EventCallback(fn_eventCallback cb, EventFilter f = EventFilter()) : callback(cb), filter(std::make_shared(f)) {} + EventCallback(fn_eventCallback cb, std::shared_ptr f) : callback(cb), filter(f) {} + EventCallback(fn_eventCallback cb, EventFilter f = EventFilter()) : callback(cb), filter(std::make_shared(f)) {} - // Allow the filter to be placed first if the user wants (maybe in the case of a lambda) + // Allow the filter to be placed first if the user wants (maybe in the case of a lambda) EventCallback(std::shared_ptr f, fn_eventCallback cb) : callback(cb), filter(f) {} EventCallback(EventFilter f, fn_eventCallback cb) : callback(cb), filter(std::make_shared(f)) {} - virtual bool callIfMatch(const std::shared_ptr& event) const { + virtual bool callIfMatch(const std::shared_ptr& event) const { bool ret = filter->match(*event); if(ret) callback(event); return ret; } - const EventFilter& getFilter() const { return *filter; } + const EventFilter& getFilter() const { return *filter; } const fn_eventCallback& getCallback() const { return callback; } private: - fn_eventCallback callback; - std::shared_ptr filter; + fn_eventCallback callback; + std::shared_ptr filter; };