From 7ec4de841e267b2e3f47e892c47a4e88ba74b9a1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Feb 2021 14:34:24 +0100 Subject: [PATCH] zeroconf/avahi/Poll: add `constexpr` --- src/zeroconf/avahi/Poll.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zeroconf/avahi/Poll.cxx b/src/zeroconf/avahi/Poll.cxx index c5f11969f..f66c2254e 100644 --- a/src/zeroconf/avahi/Poll.cxx +++ b/src/zeroconf/avahi/Poll.cxx @@ -22,14 +22,14 @@ #include "event/CoarseTimerEvent.hxx" #include "time/Convert.hxx" -static unsigned +static constexpr unsigned FromAvahiWatchEvent(AvahiWatchEvent e) noexcept { return (e & AVAHI_WATCH_IN ? SocketEvent::READ : 0) | (e & AVAHI_WATCH_OUT ? SocketEvent::WRITE : 0); } -static AvahiWatchEvent +static constexpr AvahiWatchEvent ToAvahiWatchEvent(unsigned e) noexcept { return AvahiWatchEvent((e & SocketEvent::READ ? AVAHI_WATCH_IN : 0) |