mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 00:06:11 +00:00
refactor(Core): code cleanup (part 3) (#6380)
This commit is contained in:
@@ -4,13 +4,10 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCDatabaseLoader.h"
|
||||
#include "Errors.h"
|
||||
#include "Log.h"
|
||||
#include "StringFormat.h"
|
||||
#include <sstream>
|
||||
|
||||
DBCDatabaseLoader::DBCDatabaseLoader(char const* tableName, char const* dbcFormatString, std::vector<char*>& stringPool)
|
||||
: _sqlTableName(tableName),
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "RealmSocket.h"
|
||||
#include <ace/INET_Addr.h>
|
||||
#include <ace/OS_NS_string.h>
|
||||
#include <ace/SString.h>
|
||||
|
||||
RealmSocket::Session::Session() = default;
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "ByteBuffer.h"
|
||||
#include "Errors.h"
|
||||
#include "MessageBuffer.h"
|
||||
#include "Common.h"
|
||||
#include "Log.h"
|
||||
#include "Util.h"
|
||||
#include <utf8.h>
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
|
||||
ByteBuffer& operator>>(bool& value)
|
||||
{
|
||||
value = read<char>() > 0 ? true : false;
|
||||
value = read<char>() > 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "Log.h"
|
||||
#include "SharedDefines.h"
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
|
||||
#define SECRET_FLAG_FOR(key, val, server) server ## _ ## key = (val ## ull << (16*SERVER_PROCESS_ ## server))
|
||||
#define SECRET_FLAG(key, val) SECRET_FLAG_ ## key = val, SECRET_FLAG_FOR(key, val, AUTHSERVER), SECRET_FLAG_FOR(key, val, WORLDSERVER)
|
||||
@@ -137,7 +136,7 @@ void SecretMgr::AttemptLoad(Secrets i, LogLevel errorLevel, std::unique_lock<std
|
||||
}
|
||||
|
||||
// attempt to transition us to the new key, if possible
|
||||
Optional<std::string> error = AttemptTransition(Secrets(i), currentValue, oldSecret, !!oldDigest);
|
||||
Optional<std::string> error = AttemptTransition(Secrets(i), currentValue, oldSecret, static_cast<bool>(oldDigest));
|
||||
if (error)
|
||||
{
|
||||
LOG_MESSAGE_BODY("server.loading", errorLevel, "Your value of '%s' changed, but we cannot transition your database to the new value:\n%s", info.configKey, error->c_str());
|
||||
|
||||
Reference in New Issue
Block a user