mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Quest: Fix issues reported by static analysis
(cherry picked from commit 5b8b32dac7)
This commit is contained in:
@@ -37,14 +37,14 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
|
||||
std::string const dbString = sConfigMgr->GetStringDefault(name + "DatabaseInfo", "");
|
||||
if (dbString.empty())
|
||||
{
|
||||
TC_LOG_ERROR(_logger.c_str(), "Database %s not specified in configuration file!", name.c_str());
|
||||
TC_LOG_ERROR(_logger, "Database %s not specified in configuration file!", name.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8 const asyncThreads = uint8(sConfigMgr->GetIntDefault(name + "Database.WorkerThreads", 1));
|
||||
if (asyncThreads < 1 || asyncThreads > 32)
|
||||
{
|
||||
TC_LOG_ERROR(_logger.c_str(), "%s database: invalid number of worker threads specified. "
|
||||
TC_LOG_ERROR(_logger, "%s database: invalid number of worker threads specified. "
|
||||
"Please pick a value between 1 and 32.", name.c_str());
|
||||
return false;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
|
||||
{
|
||||
if (!DBUpdater<T>::Populate(pool))
|
||||
{
|
||||
TC_LOG_ERROR(_logger.c_str(), "Could not populate the %s database, see log for details.", name.c_str());
|
||||
TC_LOG_ERROR(_logger, "Could not populate the %s database, see log for details.", name.c_str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -95,7 +95,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
|
||||
{
|
||||
if (!DBUpdater<T>::Update(pool))
|
||||
{
|
||||
TC_LOG_ERROR(_logger.c_str(), "Could not update the %s database, see log for details.", name.c_str());
|
||||
TC_LOG_ERROR(_logger, "Could not update the %s database, see log for details.", name.c_str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -106,7 +106,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
|
||||
{
|
||||
if (!pool.PrepareStatements())
|
||||
{
|
||||
TC_LOG_ERROR(_logger.c_str(), "Could not prepare statements of the %s database, see log for details.", name.c_str());
|
||||
TC_LOG_ERROR(_logger, "Could not prepare statements of the %s database, see log for details.", name.c_str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user