From c5194d0a8f5bb34cd07ed96dde70eec6cda8f963 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 19 Oct 2013 16:47:23 +0200 Subject: [PATCH] Permission: convert PERMISSION_* from macro to constexpr --- src/Permission.hxx | 11 +++++------ 1 file 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);