Commit 7ec4de84 authored by Max Kellermann's avatar Max Kellermann

zeroconf/avahi/Poll: add `constexpr`

parent 1f08d2d0
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
#include "event/CoarseTimerEvent.hxx" #include "event/CoarseTimerEvent.hxx"
#include "time/Convert.hxx" #include "time/Convert.hxx"
static unsigned static constexpr unsigned
FromAvahiWatchEvent(AvahiWatchEvent e) noexcept FromAvahiWatchEvent(AvahiWatchEvent e) noexcept
{ {
return (e & AVAHI_WATCH_IN ? SocketEvent::READ : 0) | return (e & AVAHI_WATCH_IN ? SocketEvent::READ : 0) |
(e & AVAHI_WATCH_OUT ? SocketEvent::WRITE : 0); (e & AVAHI_WATCH_OUT ? SocketEvent::WRITE : 0);
} }
static AvahiWatchEvent static constexpr AvahiWatchEvent
ToAvahiWatchEvent(unsigned e) noexcept ToAvahiWatchEvent(unsigned e) noexcept
{ {
return AvahiWatchEvent((e & SocketEvent::READ ? AVAHI_WATCH_IN : 0) | return AvahiWatchEvent((e & SocketEvent::READ ? AVAHI_WATCH_IN : 0) |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment