aboutsummaryrefslogtreecommitdiff
path: root/src/server/database
diff options
context:
space:
mode:
authorPeter Keresztes Schmidt <carbenium@outlook.com>2020-06-23 08:54:12 +0200
committerPeter Keresztes Schmidt <carbenium@outlook.com>2020-06-23 18:03:16 +0200
commitb210bb37130087d9a25a61dfb1b8baa60540c12c (patch)
tree2bd93f0a254f0d16a78c497817c9badb5d4b36b0 /src/server/database
parentdc41aae0427faecef57b831f3a2ed735a9369dd7 (diff)
Core/Misc: Replace Trinity::make_unique with std (#24869)
(cherry picked from commit bab5fd87a34d92737e92d0850be05890a5ce8e24)
Diffstat (limited to 'src/server/database')
-rw-r--r--src/server/database/Database/DatabaseWorkerPool.cpp6
-rw-r--r--src/server/database/Database/MySQLConnection.cpp4
-rw-r--r--src/server/database/Updater/UpdateFetcher.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/server/database/Database/DatabaseWorkerPool.cpp b/src/server/database/Database/DatabaseWorkerPool.cpp
index bf70289bd1c..c6a7ac1778c 100644
--- a/src/server/database/Database/DatabaseWorkerPool.cpp
+++ b/src/server/database/Database/DatabaseWorkerPool.cpp
@@ -68,7 +68,7 @@ template <class T>
void DatabaseWorkerPool<T>::SetConnectionInfo(std::string const& infoString,
uint8 const asyncThreads, uint8 const synchThreads)
{
- _connectionInfo = Trinity::make_unique<MySQLConnectionInfo>(infoString);
+ _connectionInfo = std::make_unique<MySQLConnectionInfo>(infoString);
_async_threads = asyncThreads;
_synch_threads = synchThreads;
@@ -365,9 +365,9 @@ uint32 DatabaseWorkerPool<T>::OpenConnections(InternalIndex type, uint8 numConne
switch (type)
{
case IDX_ASYNC:
- return Trinity::make_unique<T>(_queue.get(), *_connectionInfo);
+ return std::make_unique<T>(_queue.get(), *_connectionInfo);
case IDX_SYNCH:
- return Trinity::make_unique<T>(*_connectionInfo);
+ return std::make_unique<T>(*_connectionInfo);
default:
ABORT();
}
diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp
index f1e02d73765..60596a17c5c 100644
--- a/src/server/database/Database/MySQLConnection.cpp
+++ b/src/server/database/Database/MySQLConnection.cpp
@@ -65,7 +65,7 @@ m_Mysql(nullptr),
m_connectionInfo(connInfo),
m_connectionFlags(CONNECTION_ASYNC)
{
- m_worker = Trinity::make_unique<DatabaseWorker>(m_queue, this);
+ m_worker = std::make_unique<DatabaseWorker>(m_queue, this);
}
MySQLConnection::~MySQLConnection()
@@ -509,7 +509,7 @@ void MySQLConnection::PrepareStatement(uint32 index, std::string const& sql, Con
m_prepareError = true;
}
else
- m_stmts[index] = Trinity::make_unique<MySQLPreparedStatement>(reinterpret_cast<MySQLStmt*>(stmt), sql);
+ m_stmts[index] = std::make_unique<MySQLPreparedStatement>(reinterpret_cast<MySQLStmt*>(stmt), sql);
}
}
diff --git a/src/server/database/Updater/UpdateFetcher.cpp b/src/server/database/Updater/UpdateFetcher.cpp
index 8a35ae7d571..b6387e2d31a 100644
--- a/src/server/database/Updater/UpdateFetcher.cpp
+++ b/src/server/database/Updater/UpdateFetcher.cpp
@@ -41,7 +41,7 @@ UpdateFetcher::UpdateFetcher(Path const& sourceDirectory,
std::function<void(std::string const&)> const& apply,
std::function<void(Path const& path)> const& applyFile,
std::function<QueryResult(std::string const&)> const& retrieve) :
- _sourceDirectory(Trinity::make_unique<Path>(sourceDirectory)), _apply(apply), _applyFile(applyFile),
+ _sourceDirectory(std::make_unique<Path>(sourceDirectory)), _apply(apply), _applyFile(applyFile),
_retrieve(retrieve)
{
}