mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
refactor(Core): apply clang-tidy modernize-* (#9975)
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,7 @@ struct SecretInfo
|
||||
int bits;
|
||||
ServerProcessTypes owner;
|
||||
uint64 _flags;
|
||||
uint16 flags() const { return static_cast<uint16>(_flags >> (16*THIS_SERVER_PROCESS)); }
|
||||
[[nodiscard]] uint16 flags() const { return static_cast<uint16>(_flags >> (16*THIS_SERVER_PROCESS)); }
|
||||
};
|
||||
|
||||
static constexpr SecretInfo secret_info[NUM_SECRETS] =
|
||||
|
||||
@@ -37,8 +37,8 @@ enum Secrets : uint32
|
||||
class AC_SHARED_API SecretMgr
|
||||
{
|
||||
private:
|
||||
SecretMgr() {}
|
||||
~SecretMgr() {}
|
||||
SecretMgr() = default;
|
||||
~SecretMgr() = default;
|
||||
|
||||
public:
|
||||
SecretMgr(SecretMgr const&) = delete;
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
explicit operator bool() const { return (state == PRESENT); }
|
||||
BigNumber const& operator*() const { return value; }
|
||||
BigNumber const* operator->() const { return &value; }
|
||||
bool IsAvailable() const { return (state != NOT_LOADED_YET) && (state != LOAD_FAILED); }
|
||||
[[nodiscard]] bool IsAvailable() const { return (state != NOT_LOADED_YET) && (state != LOAD_FAILED); }
|
||||
|
||||
private:
|
||||
std::mutex lock;
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
private:
|
||||
void AttemptLoad(Secrets i, LogLevel errorLevel, std::unique_lock<std::mutex> const&);
|
||||
Optional<std::string> AttemptTransition(Secrets i, Optional<BigNumber> const& newSecret, Optional<BigNumber> const& oldSecret, bool hadOldSecret) const;
|
||||
[[nodiscard]] Optional<std::string> AttemptTransition(Secrets i, Optional<BigNumber> const& newSecret, Optional<BigNumber> const& oldSecret, bool hadOldSecret) const;
|
||||
|
||||
std::array<Secret, NUM_SECRETS> _secrets;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user