aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/InotifyQueue.cxx14
-rw-r--r--src/InotifyUpdate.cxx9
2 files changed, 10 insertions, 13 deletions
diff --git a/src/InotifyQueue.cxx b/src/InotifyQueue.cxx
index 28b60ebee..c24816241 100644
--- a/src/InotifyQueue.cxx
+++ b/src/InotifyQueue.cxx
@@ -26,14 +26,12 @@
#include <string.h>
-enum {
- /**
- * Wait this long after the last change before calling
- * update_enqueue(). This increases the probability that
- * updates can be bundled.
- */
- INOTIFY_UPDATE_DELAY_S = 5,
-};
+/**
+ * Wait this long after the last change before calling
+ * update_enqueue(). This increases the probability that updates can
+ * be bundled.
+ */
+static constexpr unsigned INOTIFY_UPDATE_DELAY_S = 5;
void
InotifyQueue::OnTimeout()
diff --git a/src/InotifyUpdate.cxx b/src/InotifyUpdate.cxx
index f02843ad4..5a015508a 100644
--- a/src/InotifyUpdate.cxx
+++ b/src/InotifyUpdate.cxx
@@ -39,13 +39,12 @@
#include <string.h>
#include <dirent.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;
struct WatchDirectory {
WatchDirectory *parent;