mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
This commit is contained in:
@@ -61,15 +61,15 @@ void CharacterDatabaseCleaner::CleanDatabase()
|
||||
|
||||
sWorld->SetCleaningFlags(flags);
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
TC_LOG_INFO("server.loading", ">> Cleaned character database in {} ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void CharacterDatabaseCleaner::CheckUnique(char const* column, char const* table, bool (*check)(uint32))
|
||||
{
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT DISTINCT %s FROM %s", column, table);
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT DISTINCT {} FROM {}", column, table);
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO("misc", "Table %s is empty.", table);
|
||||
TC_LOG_INFO("misc", "Table {} is empty.", table);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ bool CharacterDatabaseCleaner::TalentCheck(uint32 talent_id)
|
||||
|
||||
void CharacterDatabaseCleaner::CleanCharacterTalent()
|
||||
{
|
||||
CharacterDatabase.DirectPExecute("DELETE FROM character_talent WHERE talentGroup > %u", MAX_SPECIALIZATIONS);
|
||||
CharacterDatabase.DirectPExecute("DELETE FROM character_talent WHERE talentGroup > {}", MAX_SPECIALIZATIONS);
|
||||
CheckUnique("talentId", "character_talent", &TalentCheck);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user