aboutsummaryrefslogtreecommitdiffstats
path: root/src/Permission.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-19 16:47:23 +0200
committerMax Kellermann <max@duempel.org>2013-10-19 16:47:23 +0200
commitc5194d0a8f5bb34cd07ed96dde70eec6cda8f963 (patch)
treeee34b2ae29a3991c1c3c9e4acd6e475cde30f200 /src/Permission.hxx
parent7ece8ff85c97535a9979cc4e2fb319084dbb1f6f (diff)
downloadmpd-c5194d0a8f5bb34cd07ed96dde70eec6cda8f963.tar.gz
mpd-c5194d0a8f5bb34cd07ed96dde70eec6cda8f963.tar.xz
mpd-c5194d0a8f5bb34cd07ed96dde70eec6cda8f963.zip
Permission: convert PERMISSION_* from macro to constexpr
Diffstat (limited to 'src/Permission.hxx')
-rw-r--r--src/Permission.hxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Permission.hxx b/src/Permission.hxx
index 4ff3850e0..228e9ee20 100644
--- a/src/Permission.hxx
+++ b/src/Permission.hxx
@@ -20,12 +20,11 @@
#ifndef MPD_PERMISSION_HXX
#define MPD_PERMISSION_HXX
-#define PERMISSION_NONE 0
-#define PERMISSION_READ 1
-#define PERMISSION_ADD 2
-#define PERMISSION_CONTROL 4
-#define PERMISSION_ADMIN 8
-
+static constexpr unsigned PERMISSION_NONE = 0;
+static constexpr unsigned PERMISSION_READ = 1;
+static constexpr unsigned PERMISSION_ADD = 2;
+static constexpr unsigned PERMISSION_CONTROL = 4;
+static constexpr unsigned PERMISSION_ADMIN = 8;
int getPermissionFromPassword(char const* password, unsigned* permission);