zeroconf/avahi/Poll: add constexpr
This commit is contained in:
parent
1f08d2d03c
commit
7ec4de841e
@ -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) |
|
||||||
|
Loading…
Reference in New Issue
Block a user