diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-01-08 21:16:53 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-01-08 21:16:53 +0100 |
commit | d791afae1dfcfaf592326f787755ca32d629e4d3 (patch) | |
tree | 54dc9916ede5800e110a2f0edff91530811fbdb8 /src/server/database/Database/MySQLPreparedStatement.cpp | |
parent | b6820a706f46f18b9652fcd9806e4bec8805d29d (diff) |
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
Diffstat (limited to 'src/server/database/Database/MySQLPreparedStatement.cpp')
-rw-r--r-- | src/server/database/Database/MySQLPreparedStatement.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/database/Database/MySQLPreparedStatement.cpp b/src/server/database/Database/MySQLPreparedStatement.cpp index 3d787d956ae..dc25264e85c 100644 --- a/src/server/database/Database/MySQLPreparedStatement.cpp +++ b/src/server/database/Database/MySQLPreparedStatement.cpp @@ -77,7 +77,7 @@ void MySQLPreparedStatement::BindParameters(PreparedStatementBase* stmt) } #ifdef _DEBUG if (pos < m_paramCount) - TC_LOG_WARN("sql.sql", "[WARNING]: BindParameters() for statement %u did not bind all allocated parameters", stmt->GetIndex()); + TC_LOG_WARN("sql.sql", "[WARNING]: BindParameters() for statement {} did not bind all allocated parameters", stmt->GetIndex()); #endif } @@ -95,7 +95,7 @@ void MySQLPreparedStatement::ClearParameters() static bool ParamenterIndexAssertFail(uint32 stmtIndex, uint8 index, uint32 paramCount) { - TC_LOG_ERROR("sql.driver", "Attempted to bind parameter %u%s on a PreparedStatement %u (statement has only %u parameters)", uint32(index) + 1, (index == 1 ? "st" : (index == 2 ? "nd" : (index == 3 ? "rd" : "nd"))), stmtIndex, paramCount); + TC_LOG_ERROR("sql.driver", "Attempted to bind parameter {}{} on a PreparedStatement {} (statement has only {} parameters)", uint32(index) + 1, (index == 1 ? "st" : (index == 2 ? "nd" : (index == 3 ? "rd" : "nd"))), stmtIndex, paramCount); return false; } @@ -105,7 +105,7 @@ void MySQLPreparedStatement::AssertValidIndex(uint8 index) ASSERT(index < m_paramCount || ParamenterIndexAssertFail(m_stmt->GetIndex(), index, m_paramCount)); if (m_paramsSet[index]) - TC_LOG_ERROR("sql.sql", "[ERROR] Prepared Statement (id: %u) trying to bind value on already bound index (%u).", m_stmt->GetIndex(), index); + TC_LOG_ERROR("sql.sql", "[ERROR] Prepared Statement (id: {}) trying to bind value on already bound index ({}).", m_stmt->GetIndex(), index); } void MySQLPreparedStatement::SetParameter(uint8 index, std::nullptr_t) |