Build: Warnings
Fixed some compiler warnings, joint ops with ebsi and stalli review id = 10
This commit is contained in:
@@ -39,7 +39,7 @@ bool ConfigManager::getValue(const std::string& key, float& value) const
|
||||
std::string valueString;
|
||||
if (getValue(key, valueString))
|
||||
{
|
||||
value = atof(valueString.c_str());
|
||||
value = static_cast<float>(atof(valueString.c_str()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -82,7 +82,7 @@ void ConfigManager::setValue(const std::string& key, const float value)
|
||||
|
||||
void ConfigManager::setValue(const std::string& key, const bool value)
|
||||
{
|
||||
setValue(key, value ? "1" : "0");
|
||||
setValue(key, (value ? "1" : "0"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ void LogManager::removeLogger(std::shared_ptr<Logger> logger)
|
||||
void LogManager::removeLoggersByType(const std::string& type)
|
||||
{
|
||||
std::lock_guard<std::mutex> lockGuard(m_loggerMutex);
|
||||
for (int i = 0; i < m_loggers.size(); i++)
|
||||
for (unsigned int i = 0; i < m_loggers.size(); i++)
|
||||
{
|
||||
if (m_loggers[i]->getType() == type)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ void LogManager::logInfo(
|
||||
)
|
||||
{
|
||||
std::lock_guard<std::mutex> lockGuardLogger(m_loggerMutex);
|
||||
for (int i = 0; i < m_loggers.size(); i++)
|
||||
for (unsigned int i = 0; i < m_loggers.size(); i++)
|
||||
{
|
||||
m_loggers[i]->logInfo(LogMessage(message, file, function, line, getTime()));
|
||||
}
|
||||
@@ -81,7 +81,7 @@ void LogManager::logWarning(
|
||||
)
|
||||
{
|
||||
std::lock_guard<std::mutex> lockGuardLogger(m_loggerMutex);
|
||||
for (int i = 0; i < m_loggers.size(); i++)
|
||||
for (unsigned int i = 0; i < m_loggers.size(); i++)
|
||||
{
|
||||
m_loggers[i]->logWarning(LogMessage(message, file, function, line, getTime()));
|
||||
}
|
||||
@@ -95,7 +95,7 @@ void LogManager::logError(
|
||||
)
|
||||
{
|
||||
std::lock_guard<std::mutex> lockGuardLogger(m_loggerMutex);
|
||||
for (int i = 0; i < m_loggers.size(); i++)
|
||||
for (unsigned int i = 0; i < m_loggers.size(); i++)
|
||||
{
|
||||
m_loggers[i]->logError(LogMessage(message, file, function, line, getTime()));
|
||||
}
|
||||
@@ -112,5 +112,7 @@ tm LogManager::getTime()
|
||||
{
|
||||
time_t time;
|
||||
std::time(&time);
|
||||
return *std::localtime(&time);
|
||||
tm result;
|
||||
result = *localtime(&time);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ Vector2<T>::~Vector2()
|
||||
template<class T>
|
||||
float Vector2<T>::getLengthSquared() const
|
||||
{
|
||||
return (x * x) + (y * y);
|
||||
return static_cast<float>(x * x) + static_cast<float>(y * y);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
||||
Reference in New Issue
Block a user