From bfee808f26161c738ec4f979c6c68e2bc4ca8131 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 11 Dec 2022 10:20:26 +0000 Subject: Fix conflicting with a predefined value on Windows. STRICT is already defined on Windows so we'll need to do something else here. Thanks Microsoft. --- src/users.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 0c12dc2fa..db32a681d 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1379,10 +1379,10 @@ OperAccount::OperAccount(const std::string& n, const std::shared_ptr& , passwordhash(t->getString("hash", "plaintext", 1)) , type(o ? o->GetName() : n) { - autologin = t->getEnum("autologin", AutoLogin::NEVER, { - { "strict", AutoLogin::STRICT }, - { "relaxed", AutoLogin::RELAXED }, - { "never", AutoLogin::NEVER }, + autologin = t->getEnum("autologin", AL_NEVER, { + { "strict", AL_STRICT }, + { "relaxed", AL_RELAXED }, + { "never", AL_NEVER }, }); if (o) @@ -1401,13 +1401,13 @@ bool OperAccount::CanAutoLogin(LocalUser* user) const { switch (autologin) { - case AutoLogin::STRICT: + case AL_STRICT: return user->nick == GetName(); - case AutoLogin::RELAXED: + case AL_RELAXED: return true; - case AutoLogin::NEVER: + case AL_NEVER: return false; } -- cgit v1.3.1-10-gc9f91