diff --git a/src/common/Common.h b/src/common/Common.h index aa5748fdae..d55e5156c8 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -45,9 +45,7 @@ #if TRINITY_COMPILER == TRINITY_COMPILER_MICROSOFT -#define snprintf _snprintf #define atoll _atoi64 -#define vsnprintf _vsnprintf #define llabs _abs64 #else diff --git a/src/server/authserver/Realms/GruntRealmList.cpp b/src/server/authserver/Realms/GruntRealmList.cpp index b35303f09c..29877dd33a 100644 --- a/src/server/authserver/Realms/GruntRealmList.cpp +++ b/src/server/authserver/Realms/GruntRealmList.cpp @@ -19,11 +19,11 @@ #include "GruntRealmList.h" #include "DatabaseEnv.h" #include "DeadlineTimer.h" +#include "DeadlineTimer.h" #include "IoContext.h" #include "Log.h" #include "Resolver.h" #include "Util.h" -#include #include GruntRealmList::GruntRealmList() : _updateInterval(0) diff --git a/src/server/bnetserver/Main.cpp b/src/server/bnetserver/Main.cpp index 339f0b907c..ca830a2745 100644 --- a/src/server/bnetserver/Main.cpp +++ b/src/server/bnetserver/Main.cpp @@ -31,6 +31,7 @@ #include "Config.h" #include "DatabaseEnv.h" #include "DatabaseLoader.h" +#include "DeadlineTimer.h" #include "IoContext.h" #include "MySQLThreading.h" #include "ModuleManager.h" @@ -69,13 +70,13 @@ char serviceDescription[] = "TrinityCore Battle.net emulator authentication serv */ int m_ServiceStatus = -1; -void ServiceStatusWatcher(std::weak_ptr serviceStatusWatchTimerRef, std::weak_ptr ioContextRef, boost::system::error_code const& error); +void ServiceStatusWatcher(std::weak_ptr serviceStatusWatchTimerRef, std::weak_ptr ioContextRef, boost::system::error_code const& error); #endif bool StartDB(); void StopDB(); void SignalHandler(std::weak_ptr ioContextRef, boost::system::error_code const& error, int signalNumber); -void KeepDatabaseAliveHandler(std::weak_ptr dbPingTimerRef, int32 dbPingInterval, boost::system::error_code const& error); +void KeepDatabaseAliveHandler(std::weak_ptr dbPingTimerRef, int32 dbPingInterval, boost::system::error_code const& error); variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile, std::string& configService); int main(int argc, char** argv) @@ -194,18 +195,18 @@ int main(int argc, char** argv) // Enabled a timed callback for handling the database keep alive ping int32 dbPingInterval = sConfigMgr->GetIntDefault("MaxPingTime", 30); - std::shared_ptr dbPingTimer = std::make_shared(*ioContext); + std::shared_ptr dbPingTimer = std::make_shared(*ioContext); dbPingTimer->expires_from_now(boost::posix_time::minutes(dbPingInterval)); - dbPingTimer->async_wait(std::bind(&KeepDatabaseAliveHandler, std::weak_ptr(dbPingTimer), dbPingInterval, std::placeholders::_1)); + dbPingTimer->async_wait(std::bind(&KeepDatabaseAliveHandler, std::weak_ptr(dbPingTimer), dbPingInterval, std::placeholders::_1)); #if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS - std::shared_ptr serviceStatusWatchTimer; + std::shared_ptr serviceStatusWatchTimer; if (m_ServiceStatus != -1) { - serviceStatusWatchTimer = std::make_shared(*ioContext); + serviceStatusWatchTimer = std::make_shared(*ioContext); serviceStatusWatchTimer->expires_from_now(boost::posix_time::seconds(1)); serviceStatusWatchTimer->async_wait(std::bind(&ServiceStatusWatcher, - std::weak_ptr(serviceStatusWatchTimer), + std::weak_ptr(serviceStatusWatchTimer), std::weak_ptr(ioContext), std::placeholders::_1)); } @@ -259,11 +260,11 @@ void SignalHandler(std::weak_ptr ioContextRef, boost:: ioContext->stop(); } -void KeepDatabaseAliveHandler(std::weak_ptr dbPingTimerRef, int32 dbPingInterval, boost::system::error_code const& error) +void KeepDatabaseAliveHandler(std::weak_ptr dbPingTimerRef, int32 dbPingInterval, boost::system::error_code const& error) { if (!error) { - if (std::shared_ptr dbPingTimer = dbPingTimerRef.lock()) + if (std::shared_ptr dbPingTimer = dbPingTimerRef.lock()) { TC_LOG_INFO("server.bnetserver", "Ping MySQL to keep connection alive"); LoginDatabase.KeepAlive(); @@ -275,7 +276,7 @@ void KeepDatabaseAliveHandler(std::weak_ptr dbPingT } #if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS -void ServiceStatusWatcher(std::weak_ptr serviceStatusWatchTimerRef, std::weak_ptr ioContextRef, boost::system::error_code const& error) +void ServiceStatusWatcher(std::weak_ptr serviceStatusWatchTimerRef, std::weak_ptr ioContextRef, boost::system::error_code const& error) { if (!error) { @@ -285,7 +286,7 @@ void ServiceStatusWatcher(std::weak_ptr serviceStat { ioContext->stop(); } - else if (std::shared_ptr serviceStatusWatchTimer = serviceStatusWatchTimerRef.lock()) + else if (std::shared_ptr serviceStatusWatchTimer = serviceStatusWatchTimerRef.lock()) { serviceStatusWatchTimer->expires_from_now(boost::posix_time::seconds(1)); serviceStatusWatchTimer->async_wait(std::bind(&ServiceStatusWatcher, serviceStatusWatchTimerRef, ioContext, std::placeholders::_1)); diff --git a/src/server/bnetserver/Realms/BNetRealmList.cpp b/src/server/bnetserver/Realms/BNetRealmList.cpp index 167d6f452d..bf2b5de41a 100644 --- a/src/server/bnetserver/Realms/BNetRealmList.cpp +++ b/src/server/bnetserver/Realms/BNetRealmList.cpp @@ -19,13 +19,13 @@ #include "BNetRealmList.h" #include "DatabaseEnv.h" #include "DeadlineTimer.h" +#include "DeadlineTimer.h" #include "IoContext.h" #include "Log.h" #include "Resolver.h" #include "SessionManager.h" #include "Util.h" #include "WorldListener.h" -#include #include BNetRealmList::BNetRealmList() : _updateInterval(0)