X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e9ae1f101b5418c0ba2e6c9d86b23c12f0140982..72797a0baa15ce75663a8dc662a132a6dd1a0de1:/include/stg/admin_conf.h?ds=sidebyside diff --git a/include/stg/admin_conf.h b/include/stg/admin_conf.h index c4871970..b402e241 100644 --- a/include/stg/admin_conf.h +++ b/include/stg/admin_conf.h @@ -1,8 +1,7 @@ #pragma once -#include "stg/optional.h" - #include +#include #include @@ -14,17 +13,7 @@ namespace STG struct Priv { - Priv() noexcept - : userStat(0), - userConf(0), - userCash(0), - userPasswd(0), - userAddDel(0), - adminChg(0), - tariffChg(0), - serviceChg(0), - corpChg(0) - {} + Priv() noexcept : Priv(0) {} explicit Priv(uint32_t p) noexcept : userStat((p & 0x00000003) >> 0x00), userConf((p & 0x0000000C) >> 0x02), @@ -69,10 +58,8 @@ struct Priv //----------------------------------------------------------------------------- struct AdminConf { - AdminConf() - : password("* NO PASSWORD *") - {} - AdminConf(const Priv & pr, const std::string & l, const std::string & p) + AdminConf() : AdminConf({}, {}, "* NO PASSWORD *") {} + AdminConf(const Priv& pr, const std::string& l, const std::string& p) : priv(pr), login(l), password(p) @@ -90,9 +77,9 @@ struct AdminConf //----------------------------------------------------------------------------- struct AdminConfOpt { - Optional priv; - Optional login; - Optional password; + std::optional priv; + std::optional login; + std::optional password; }; }