mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 06:48:20 +00:00
Warning fixes, general cleanup (#5053)
This commit is contained in:
+7
-4
@@ -17,10 +17,12 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "mysql.h"
|
||||
#include "common/dbcore.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <string_view>
|
||||
@@ -183,7 +185,7 @@ public:
|
||||
int64_t, uint64_t, float, double, bool, std::string_view, std::nullptr_t>;
|
||||
|
||||
PreparedStmt() = delete;
|
||||
PreparedStmt(MYSQL& mysql, std::string query, Mutex* mutex, StmtOptions opts = {});
|
||||
PreparedStmt(MYSQL& mysql, std::string query, DBcore::Mutex& mutex, StmtOptions opts = {});
|
||||
|
||||
const std::string& GetQuery() const { return m_query; }
|
||||
StmtOptions GetOptions() const { return m_options; }
|
||||
@@ -219,7 +221,8 @@ private:
|
||||
|
||||
struct StmtDeleter
|
||||
{
|
||||
Mutex* mutex = nullptr;
|
||||
DBcore::Mutex& mutex;
|
||||
|
||||
void operator()(MYSQL_STMT* stmt) noexcept;
|
||||
};
|
||||
|
||||
@@ -232,7 +235,7 @@ private:
|
||||
std::string m_query;
|
||||
StmtOptions m_options = {};
|
||||
bool m_need_bind = true;
|
||||
Mutex* m_mutex = nullptr; // connection mutex
|
||||
DBcore::Mutex& m_mutex; // connection mutex
|
||||
};
|
||||
|
||||
} // namespace mysql
|
||||
|
||||
Reference in New Issue
Block a user