mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core: Fixed some level 4 warnings (msvc)
This commit is contained in:
@@ -254,7 +254,7 @@ int Master::Run()
|
||||
}
|
||||
|
||||
///- Launch the world listener socket
|
||||
uint16 wsport = sWorld->getIntConfig(CONFIG_PORT_WORLD);
|
||||
uint16 wsport = uint16(sWorld->getIntConfig(CONFIG_PORT_WORLD));
|
||||
std::string bind_ip = ConfigMgr::GetStringDefault("BindIP", "0.0.0.0");
|
||||
|
||||
if (sWorldSocketMgr->StartNetwork(wsport, bind_ip.c_str()) == -1)
|
||||
@@ -364,7 +364,7 @@ bool Master::_StartDB()
|
||||
return false;
|
||||
}
|
||||
|
||||
async_threads = ConfigMgr::GetIntDefault("WorldDatabase.WorkerThreads", 1);
|
||||
async_threads = uint8(ConfigMgr::GetIntDefault("WorldDatabase.WorkerThreads", 1));
|
||||
if (async_threads < 1 || async_threads > 32)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_WORLDSERVER, "World database: invalid number of worker threads specified. "
|
||||
@@ -372,7 +372,7 @@ bool Master::_StartDB()
|
||||
return false;
|
||||
}
|
||||
|
||||
synch_threads = ConfigMgr::GetIntDefault("WorldDatabase.SynchThreads", 1);
|
||||
synch_threads = uint8(ConfigMgr::GetIntDefault("WorldDatabase.SynchThreads", 1));
|
||||
///- Initialise the world database
|
||||
if (!WorldDatabase.Open(dbstring, async_threads, synch_threads))
|
||||
{
|
||||
@@ -388,7 +388,7 @@ bool Master::_StartDB()
|
||||
return false;
|
||||
}
|
||||
|
||||
async_threads = ConfigMgr::GetIntDefault("CharacterDatabase.WorkerThreads", 1);
|
||||
async_threads = uint8(ConfigMgr::GetIntDefault("CharacterDatabase.WorkerThreads", 1));
|
||||
if (async_threads < 1 || async_threads > 32)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_WORLDSERVER, "Character database: invalid number of worker threads specified. "
|
||||
@@ -396,7 +396,7 @@ bool Master::_StartDB()
|
||||
return false;
|
||||
}
|
||||
|
||||
synch_threads = ConfigMgr::GetIntDefault("CharacterDatabase.SynchThreads", 2);
|
||||
synch_threads = uint8(ConfigMgr::GetIntDefault("CharacterDatabase.SynchThreads", 2));
|
||||
|
||||
///- Initialise the Character database
|
||||
if (!CharacterDatabase.Open(dbstring, async_threads, synch_threads))
|
||||
@@ -413,7 +413,7 @@ bool Master::_StartDB()
|
||||
return false;
|
||||
}
|
||||
|
||||
async_threads = ConfigMgr::GetIntDefault("LoginDatabase.WorkerThreads", 1);
|
||||
async_threads = uint8(ConfigMgr::GetIntDefault("LoginDatabase.WorkerThreads", 1));
|
||||
if (async_threads < 1 || async_threads > 32)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_WORLDSERVER, "Login database: invalid number of worker threads specified. "
|
||||
@@ -421,7 +421,7 @@ bool Master::_StartDB()
|
||||
return false;
|
||||
}
|
||||
|
||||
synch_threads = ConfigMgr::GetIntDefault("LoginDatabase.SynchThreads", 1);
|
||||
synch_threads = uint8(ConfigMgr::GetIntDefault("LoginDatabase.SynchThreads", 1));
|
||||
///- Initialise the login database
|
||||
if (!LoginDatabase.Open(dbstring, async_threads, synch_threads))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user