mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 07:06:23 +00:00
feat(Core/Common): add support fmt style for ASSERT and ABORT (#10355)
* feat(Core/Common): add support fmt style for ASSERT and ABORT * correct CheckCompactArrayMaskOverflow * 1 * Update src/server/game/Spells/Spell.cpp
This commit is contained in:
@@ -262,7 +262,7 @@ std::vector<uint8> Field::GetBinary() const
|
||||
|
||||
void Field::GetBinarySizeChecked(uint8* buf, size_t length) const
|
||||
{
|
||||
ASSERT(data.value && (data.length == length), "Expected %zu-byte binary blob, got %sdata (%u bytes) instead", length, data.value ? "" : "no ", data.length);
|
||||
ASSERT(data.value && (data.length == length), "Expected {}-byte binary blob, got {}data ({} bytes) instead", length, data.value ? "" : "no ", data.length);
|
||||
memcpy(buf, data.value, length);
|
||||
}
|
||||
|
||||
|
||||
@@ -467,8 +467,8 @@ uint32 MySQLConnection::GetServerVersion() const
|
||||
|
||||
MySQLPreparedStatement* MySQLConnection::GetPreparedStatement(uint32 index)
|
||||
{
|
||||
ASSERT(index < m_stmts.size(), "Tried to access invalid prepared statement index %u (max index " SZFMTD ") on database `%s`, connection type: %s",
|
||||
index, m_stmts.size(), m_connectionInfo.database.c_str(), (m_connectionFlags & CONNECTION_ASYNC) ? "asynchronous" : "synchronous");
|
||||
ASSERT(index < m_stmts.size(), "Tried to access invalid prepared statement index {} (max index {}) on database `{}`, connection type: {}",
|
||||
index, m_stmts.size(), m_connectionInfo.database, (m_connectionFlags & CONNECTION_ASYNC) ? "asynchronous" : "synchronous");
|
||||
MySQLPreparedStatement* ret = m_stmts[index].get();
|
||||
if (!ret)
|
||||
LOG_ERROR("sql.sql", "Could not fetch prepared statement %u on database `%s`, connection type: %s.",
|
||||
|
||||
@@ -37,7 +37,7 @@ bool SQLQueryHolderBase::SetPreparedQueryImpl(size_t index, PreparedStatementBas
|
||||
PreparedQueryResult SQLQueryHolderBase::GetPreparedResult(size_t index) const
|
||||
{
|
||||
// Don't call to this function if the index is of a prepared statement
|
||||
ASSERT(index < m_queries.size(), "Query holder result index out of range, tried to access index " SZFMTD " but there are only " SZFMTD " results",
|
||||
ASSERT(index < m_queries.size(), "Query holder result index out of range, tried to access index {} but there are only {} results",
|
||||
index, m_queries.size());
|
||||
|
||||
return m_queries[index].second;
|
||||
|
||||
Reference in New Issue
Block a user