Permission: convert PERMISSION_* from macro to constexpr

This commit is contained in:
Max Kellermann 2013-10-19 16:47:23 +02:00
parent 7ece8ff85c
commit c5194d0a8f

View File

@ -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);