summaryrefslogtreecommitdiff
path: root/test/run_inotify.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-20 13:51:55 +0200
committerMax Kellermann <max@duempel.org>2013-10-20 13:51:55 +0200
commit3315c67f0f06d49f69f3b02bdabefd04542872df (patch)
treedd8b9a5c44137635e54938d810801d6dfb86004a /test/run_inotify.cxx
parentb879bcb1eb2cf7e339d206089dcda033fc05239a (diff)
Inotify: convert anonymous enum to constexpr
Diffstat (limited to 'test/run_inotify.cxx')
-rw-r--r--test/run_inotify.cxx9
1 files changed, 4 insertions, 5 deletions
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 <sys/inotify.h>
-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,