event: Constify operations
diff --git a/src/sdeventplus/event.cpp b/src/sdeventplus/event.cpp
index e8e8d19..1d31f91 100644
--- a/src/sdeventplus/event.cpp
+++ b/src/sdeventplus/event.cpp
@@ -44,7 +44,7 @@
return Event(event, std::false_type(), sdevent);
}
-int Event::loop()
+int Event::loop() const
{
int r = sdevent->sd_event_loop(event.get());
if (r < 0)
@@ -54,7 +54,7 @@
return r;
}
-int Event::get_watchdog()
+int Event::get_watchdog() const
{
int r = sdevent->sd_event_get_watchdog(event.get());
if (r < 0)
@@ -64,7 +64,7 @@
return r;
}
-int Event::set_watchdog(int b)
+int Event::set_watchdog(int b) const
{
int r = sdevent->sd_event_set_watchdog(event.get(), b);
if (r < 0)
diff --git a/src/sdeventplus/event.hpp b/src/sdeventplus/event.hpp
index e7c007f..a583dfb 100644
--- a/src/sdeventplus/event.hpp
+++ b/src/sdeventplus/event.hpp
@@ -20,9 +20,9 @@
static Event
get_default(const internal::SdEvent* sdevent = &internal::sdevent_impl);
- int loop();
- int get_watchdog();
- int set_watchdog(int b);
+ int loop() const;
+ int get_watchdog() const;
+ int set_watchdog(int b) const;
private:
const internal::SdEvent* sdevent;