mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/Database: Include cleanup
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "QueryCallback.h"
|
||||
#include "Errors.h"
|
||||
|
||||
template<typename T, typename... Args>
|
||||
inline void Construct(T& t, Args&&... args)
|
||||
@@ -30,7 +31,7 @@ inline void Destroy(T& t)
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void ConstructActiveMember(T* obj)
|
||||
inline void ConstructActiveMember(T* obj)
|
||||
{
|
||||
if (!obj->_isPrepared)
|
||||
Construct(obj->_string);
|
||||
@@ -39,7 +40,7 @@ void ConstructActiveMember(T* obj)
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void DestroyActiveMember(T* obj)
|
||||
inline void DestroyActiveMember(T* obj)
|
||||
{
|
||||
if (!obj->_isPrepared)
|
||||
Destroy(obj->_string);
|
||||
@@ -48,7 +49,7 @@ void DestroyActiveMember(T* obj)
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void MoveFrom(T* to, T&& from)
|
||||
inline void MoveFrom(T* to, T&& from)
|
||||
{
|
||||
ASSERT(to->_isPrepared == from._isPrepared);
|
||||
|
||||
@@ -199,7 +200,7 @@ QueryCallback::Status QueryCallback::InvokeIfReady()
|
||||
{
|
||||
if (_string.valid() && _string.wait_for(std::chrono::seconds(0)) == std::future_status::ready)
|
||||
{
|
||||
std::future<QueryResult> f(std::move(_string));
|
||||
QueryResultFuture f(std::move(_string));
|
||||
std::function<void(QueryCallback&, QueryResult)> cb(std::move(callback._string));
|
||||
cb(*this, f.get());
|
||||
return checkStateAndReturnCompletion();
|
||||
@@ -209,7 +210,7 @@ QueryCallback::Status QueryCallback::InvokeIfReady()
|
||||
{
|
||||
if (_prepared.valid() && _prepared.wait_for(std::chrono::seconds(0)) == std::future_status::ready)
|
||||
{
|
||||
std::future<PreparedQueryResult> f(std::move(_prepared));
|
||||
PreparedQueryResultFuture f(std::move(_prepared));
|
||||
std::function<void(QueryCallback&, PreparedQueryResult)> cb(std::move(callback._prepared));
|
||||
cb(*this, f.get());
|
||||
return checkStateAndReturnCompletion();
|
||||
|
||||
Reference in New Issue
Block a user