mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 17:24:33 +00:00
feat(Core/DBLayer): replace char const* to std::string_view (#10211)
* feat(Core/DBLayer): replace `char const*` to `std::string_view` * CString * 1 * chore(Core/Misc): code cleanup * cl * db fix * fmt style sql * to fmt * py * del old * 1 * 2 * 3 * 1 * 1
This commit is contained in:
@@ -57,7 +57,7 @@ void WardenCheckMgr::LoadWardenChecks()
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint16 maxCheckId = fields[0].GetUInt16();
|
||||
uint16 maxCheckId = fields[0].Get<uint16>();
|
||||
|
||||
CheckStore.resize(maxCheckId + 1);
|
||||
|
||||
@@ -69,8 +69,8 @@ void WardenCheckMgr::LoadWardenChecks()
|
||||
{
|
||||
fields = result->Fetch();
|
||||
|
||||
uint16 id = fields[0].GetUInt16();
|
||||
uint8 checkType = fields[1].GetUInt8();
|
||||
uint16 id = fields[0].Get<uint16>();
|
||||
uint8 checkType = fields[1].Get<uint8>();
|
||||
|
||||
if (checkType == LUA_EVAL_CHECK && id > 9999)
|
||||
{
|
||||
@@ -78,12 +78,12 @@ void WardenCheckMgr::LoadWardenChecks()
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string data = fields[2].GetString();
|
||||
std::string checkResult = fields[3].GetString();
|
||||
uint32 address = fields[4].GetUInt32();
|
||||
uint8 length = fields[5].GetUInt8();
|
||||
std::string str = fields[6].GetString();
|
||||
std::string comment = fields[7].GetString();
|
||||
std::string data = fields[2].Get<std::string>();
|
||||
std::string checkResult = fields[3].Get<std::string>();
|
||||
uint32 address = fields[4].Get<uint32>();
|
||||
uint8 length = fields[5].Get<uint8>();
|
||||
std::string str = fields[6].Get<std::string>();
|
||||
std::string comment = fields[7].Get<std::string>();
|
||||
|
||||
WardenCheck &wardenCheck = CheckStore.at(id);
|
||||
wardenCheck.Type = checkType;
|
||||
@@ -187,8 +187,8 @@ void WardenCheckMgr::LoadWardenOverrides()
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint16 checkId = fields[0].GetUInt16();
|
||||
uint8 action = fields[1].GetUInt8();
|
||||
uint16 checkId = fields[0].Get<uint16>();
|
||||
uint8 action = fields[1].Get<uint8>();
|
||||
|
||||
// Check if action value is in range (0-2, see WardenActions enum)
|
||||
if (action > WARDEN_ACTION_BAN)
|
||||
|
||||
Reference in New Issue
Block a user