refactor(Core): apply clang-tidy modernize-* (#9975)
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -36,10 +36,10 @@ enum RealmFlags
|
||||
|
||||
struct AC_SHARED_API RealmHandle
|
||||
{
|
||||
RealmHandle() : Realm(0) { }
|
||||
RealmHandle() = default;
|
||||
RealmHandle(uint32 index) : Realm(index) { }
|
||||
|
||||
uint32 Realm; // primary key in `realmlist` table
|
||||
uint32 Realm{0}; // primary key in `realmlist` table
|
||||
|
||||
bool operator<(RealmHandle const& r) const
|
||||
{
|
||||
@@ -78,7 +78,7 @@ struct AC_SHARED_API Realm
|
||||
AccountTypes AllowedSecurityLevel;
|
||||
float PopulationLevel;
|
||||
|
||||
boost::asio::ip::tcp_endpoint GetAddressForClient(boost::asio::ip::address const& clientAddr) const;
|
||||
[[nodiscard]] boost::asio::ip::tcp_endpoint GetAddressForClient(boost::asio::ip::address const& clientAddr) const;
|
||||
};
|
||||
|
||||
#endif // Realm_h__
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
#include "Util.h"
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
RealmList::RealmList() :
|
||||
_updateInterval(0) { }
|
||||
RealmList::RealmList() : _updateInterval(0) { }
|
||||
|
||||
RealmList* RealmList::Instance()
|
||||
{
|
||||
|
||||
@@ -52,10 +52,10 @@ public:
|
||||
void Initialize(Acore::Asio::IoContext& ioContext, uint32 updateInterval);
|
||||
void Close();
|
||||
|
||||
RealmMap const& GetRealms() const { return _realms; }
|
||||
Realm const* GetRealm(RealmHandle const& id) const;
|
||||
[[nodiscard]] RealmMap const& GetRealms() const { return _realms; }
|
||||
[[nodiscard]] Realm const* GetRealm(RealmHandle const& id) const;
|
||||
|
||||
RealmBuildInfo const* GetBuildInfo(uint32 build) const;
|
||||
[[nodiscard]] RealmBuildInfo const* GetBuildInfo(uint32 build) const;
|
||||
|
||||
private:
|
||||
RealmList();
|
||||
@@ -69,7 +69,7 @@ private:
|
||||
|
||||
std::vector<RealmBuildInfo> _builds;
|
||||
RealmMap _realms;
|
||||
uint32 _updateInterval;
|
||||
uint32 _updateInterval{0};
|
||||
std::unique_ptr<Acore::Asio::DeadlineTimer> _updateTimer;
|
||||
std::unique_ptr<Acore::Asio::Resolver> _resolver;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user