mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Replace Trinity::make_unique with std (#24869)
This commit is contained in:
committed by
GitHub
parent
01c8d03e2e
commit
bab5fd87a3
@@ -69,7 +69,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();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ m_Mysql(NULL),
|
||||
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()
|
||||
@@ -486,7 +486,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,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)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user