Permission: add noexcept
This commit is contained in:
parent
3f05b7d8b4
commit
8499a662ea
@ -131,7 +131,8 @@ initPermissions(const ConfigData &config)
|
||||
#endif
|
||||
}
|
||||
|
||||
int getPermissionFromPassword(char const* password, unsigned* permission)
|
||||
int
|
||||
getPermissionFromPassword(const char *password, unsigned *permission) noexcept
|
||||
{
|
||||
auto i = permission_passwords.find(password);
|
||||
if (i == permission_passwords.end())
|
||||
@ -141,7 +142,8 @@ int getPermissionFromPassword(char const* password, unsigned* permission)
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned getDefaultPermissions(void)
|
||||
unsigned
|
||||
getDefaultPermissions() noexcept
|
||||
{
|
||||
return permission_default;
|
||||
}
|
||||
|
@ -30,10 +30,11 @@ 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);
|
||||
int
|
||||
getPermissionFromPassword(const char *password, unsigned *permission) noexcept;
|
||||
|
||||
unsigned
|
||||
getDefaultPermissions();
|
||||
getDefaultPermissions() noexcept;
|
||||
|
||||
#ifdef HAVE_UN
|
||||
unsigned
|
||||
|
Loading…
Reference in New Issue
Block a user