mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +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:
@@ -599,7 +599,7 @@ void WorldSession::HandleCharacterAuraFrozen(PreparedQueryResult result)
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
std::string player = fields[0].GetString();
|
||||
std::string player = fields[0].Get<std::string>();
|
||||
handler.PSendSysMessage(LANG_COMMAND_FROZEN_PLAYERS, player.c_str());
|
||||
} while (result->NextRow());
|
||||
}
|
||||
@@ -623,8 +623,8 @@ void WorldSession::HandleBugOpcode(WorldPacket& recv_data)
|
||||
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_BUG_REPORT);
|
||||
|
||||
stmt->setString(0, type);
|
||||
stmt->setString(1, content);
|
||||
stmt->SetData(0, type);
|
||||
stmt->SetData(1, content);
|
||||
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
@@ -1121,7 +1121,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
|
||||
LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_WHOIS);
|
||||
|
||||
stmt->setUInt32(0, accid);
|
||||
stmt->SetData(0, accid);
|
||||
|
||||
PreparedQueryResult result = LoginDatabase.Query(stmt);
|
||||
|
||||
@@ -1132,13 +1132,13 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
}
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
std::string acc = fields[0].GetString();
|
||||
std::string acc = fields[0].Get<std::string>();
|
||||
if (acc.empty())
|
||||
acc = "Unknown";
|
||||
std::string email = fields[1].GetString();
|
||||
std::string email = fields[1].Get<std::string>();
|
||||
if (email.empty())
|
||||
email = "Unknown";
|
||||
std::string lastip = fields[2].GetString();
|
||||
std::string lastip = fields[2].Get<std::string>();
|
||||
if (lastip.empty())
|
||||
lastip = "Unknown";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user