refactor(Core): apply clang-tidy modernize-* (#9975)

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Francesco Borzì
2022-01-17 14:35:07 +01:00
committed by GitHub
parent fe4899202d
commit 9dc88def35
71 changed files with 533 additions and 534 deletions
+3 -3
View File
@@ -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__
+1 -2
View File
@@ -24,8 +24,7 @@
#include "Util.h"
#include <boost/asio/ip/tcp.hpp>
RealmList::RealmList() :
_updateInterval(0) { }
RealmList::RealmList() : _updateInterval(0) { }
RealmList* RealmList::Instance()
{
+4 -4
View File
@@ -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;
};