diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-01-03 13:04:19 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-01-03 13:04:19 +0100 |
| commit | 27860c3316b7354c6bf17cac82992085d2905934 (patch) | |
| tree | a0c87fdb392b2d3ce2af9e8788e1081421740975 /src/server/shared | |
| parent | 000e4e99702d703ada9b2798f579534b547e35a6 (diff) | |
Core/Database: Added std::span based functions to Field and PreparedStatement
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()); |
