From 3315c67f0f06d49f69f3b02bdabefd04542872df Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 20 Oct 2013 13:51:55 +0200 Subject: Inotify: convert anonymous enum to constexpr --- test/run_inotify.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/run_inotify.cxx b/test/run_inotify.cxx index fb614432e..c57e6e9ef 100644 --- a/test/run_inotify.cxx +++ b/test/run_inotify.cxx @@ -28,13 +28,12 @@ #include -enum { - IN_MASK = IN_ATTRIB|IN_CLOSE_WRITE|IN_CREATE|IN_DELETE|IN_DELETE_SELF - |IN_MOVE|IN_MOVE_SELF +static constexpr unsigned IN_MASK = #ifdef IN_ONLYDIR - |IN_ONLYDIR + IN_ONLYDIR| #endif -}; + IN_ATTRIB|IN_CLOSE_WRITE|IN_CREATE|IN_DELETE|IN_DELETE_SELF + |IN_MOVE|IN_MOVE_SELF; static void my_inotify_callback(gcc_unused int wd, unsigned mask, -- cgit v1.2.3