mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-24 07:30:07 -04:00
Core/DataStores: Replace harcoded prepared statement offsets with named constants
This commit is contained in:
@@ -23,12 +23,12 @@
|
||||
|
||||
// Force max id statements to appear exactly right after normal data fetch statement
|
||||
#define PREPARE_MAX_ID_STMT(stmtBase, sql, con) \
|
||||
static_assert(stmtBase + 1 == stmtBase##_MAX_ID, "Invalid prepared statement index for " #stmtBase "_MAX_ID"); \
|
||||
static_assert(stmtBase + HOTFIX_MAX_ID_STMT_OFFSET == stmtBase##_MAX_ID, "Invalid prepared statement index for " #stmtBase "_MAX_ID"); \
|
||||
PrepareStatement(stmtBase##_MAX_ID, sql, con);
|
||||
|
||||
// Force locale statements to be right after max id fetch statement
|
||||
#define PREPARE_LOCALE_STMT(stmtBase, sql, con) \
|
||||
static_assert(stmtBase + 2 == stmtBase##_LOCALE, "Invalid prepared statement index for " #stmtBase "_LOCALE"); \
|
||||
static_assert(stmtBase + HOTFIX_LOCALE_STMT_OFFSET == stmtBase##_LOCALE, "Invalid prepared statement index for " #stmtBase "_LOCALE"); \
|
||||
PrepareStatement(stmtBase##_LOCALE, sql, con);
|
||||
|
||||
void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
Reference in New Issue
Block a user