diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-01-03 13:04:19 +0100 |
|---|---|---|
| committer | Ovahlord <dreadkiller@gmx.de> | 2025-01-03 18:05:04 +0100 |
| commit | 5da556b9a4094da461a4c88249fb0359172d72d2 (patch) | |
| tree | a18f013ee77e9f2bb9397c63d240cc4e49b12f6e /src/server/shared | |
| parent | a7587de5ede4da43cdc87a98322e2002093985bf (diff) | |
Core/Database: Added std::span based functions to Field and PreparedStatement
(cherry picked from commit 27860c3316b7354c6bf17cac82992085d2905934)
# Conflicts:
# src/server/game/Entities/Player/Player.cpp
Diffstat (limited to 'src/server/shared')
| -rw-r--r-- | src/server/shared/DataStores/DB2DatabaseLoader.cpp | 2 | ||||
| -rw-r--r-- | src/server/shared/Secrets/SecretMgr.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/server/shared/DataStores/DB2DatabaseLoader.cpp b/src/server/shared/DataStores/DB2DatabaseLoader.cpp index 5b8cea5f0c3..32595995060 100644 --- a/src/server/shared/DataStores/DB2DatabaseLoader.cpp +++ b/src/server/shared/DataStores/DB2DatabaseLoader.cpp @@ -188,7 +188,7 @@ void DB2DatabaseLoader::LoadStrings(bool custom, LocaleConstant locale, uint32 r { HotfixDatabasePreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(HotfixDatabaseStatements(_loadInfo->Statement + HOTFIX_LOCALE_STMT_OFFSET)); stmt->setBool(0, !custom); - stmt->setString(1, localeNames[locale]); + stmt->setString(1, std::string_view(localeNames[locale])); PreparedQueryResult result = HotfixDatabase.Query(stmt); if (!result) return; diff --git a/src/server/shared/Secrets/SecretMgr.cpp b/src/server/shared/Secrets/SecretMgr.cpp index a4d487b3401..f084bd10bfb 100644 --- a/src/server/shared/Secrets/SecretMgr.cpp +++ b/src/server/shared/Secrets/SecretMgr.cpp @@ -200,7 +200,7 @@ Optional<std::string> SecretMgr::AttemptTransition(Secrets i, Optional<BigNumber Trinity::Crypto::AEEncryptWithRandomIV<Trinity::Crypto::AES>(totpSecret, newSecret->ToByteArray<Trinity::Crypto::AES::KEY_SIZE_BYTES>()); LoginDatabasePreparedStatement* updateStmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_TOTP_SECRET); - updateStmt->setBinary(0, totpSecret); + updateStmt->setBinary(0, std::move(totpSecret)); updateStmt->setUInt32(1, id); trans->Append(updateStmt); } while (result->NextRow()); |
