Skip to content
Snippets Groups Projects
Commit a2d2fb4c authored by Christian Godenschwager's avatar Christian Godenschwager
Browse files

Fixed conversion warnings in VS2017

parent 4c5afc5f
No related merge requests found
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "Logging.h" #include "Logging.h"
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <algorithm> #include <algorithm>
#include <sstream> #include <sstream>
#include <string> #include <string>
...@@ -139,7 +140,7 @@ void configureLogging( const Config::BlockHandle & loggingBlock ) ...@@ -139,7 +140,7 @@ void configureLogging( const Config::BlockHandle & loggingBlock )
if( loggingBlock.isDefined( "logLevel" ) ) if( loggingBlock.isDefined( "logLevel" ) )
{ {
std::string type = loggingBlock.getParameter< std::string >( "logLevel" ); std::string type = loggingBlock.getParameter< std::string >( "logLevel" );
std::transform( type.begin(), type.end(), type.begin(), ::tolower ); //convert to lower case boost::algorithm::to_lower( type );
if( type.compare("warning") == 0 ){ if( type.compare("warning") == 0 ){
logging::Logging::instance()->setLogLevel( logging::Logging::WARNING ); logging::Logging::instance()->setLogLevel( logging::Logging::WARNING );
...@@ -158,7 +159,7 @@ void configureLogging( const Config::BlockHandle & loggingBlock ) ...@@ -158,7 +159,7 @@ void configureLogging( const Config::BlockHandle & loggingBlock )
if( loggingBlock.isDefined( "streamLogLevel" ) ) if( loggingBlock.isDefined( "streamLogLevel" ) )
{ {
std::string type = loggingBlock.getParameter< std::string >( "streamLogLevel" ); std::string type = loggingBlock.getParameter< std::string >( "streamLogLevel" );
std::transform( type.begin(), type.end(), type.begin(), ::tolower ); //convert to lower case boost::algorithm::to_lower( type );
if( type.compare("warning") == 0 ){ if( type.compare("warning") == 0 ){
logging::Logging::instance()->setStreamLogLevel( logging::Logging::WARNING ); logging::Logging::instance()->setStreamLogLevel( logging::Logging::WARNING );
...@@ -177,7 +178,7 @@ void configureLogging( const Config::BlockHandle & loggingBlock ) ...@@ -177,7 +178,7 @@ void configureLogging( const Config::BlockHandle & loggingBlock )
if( loggingBlock.isDefined( "fileLogLevel" ) ) if( loggingBlock.isDefined( "fileLogLevel" ) )
{ {
std::string type = loggingBlock.getParameter< std::string >( "fileLogLevel" ); std::string type = loggingBlock.getParameter< std::string >( "fileLogLevel" );
std::transform( type.begin(), type.end(), type.begin(), ::tolower ); //convert to lower case boost::algorithm::to_lower( type );
if( type.compare("warning") == 0 ){ if( type.compare("warning") == 0 ){
logging::Logging::instance()->setFileLogLevel( logging::Logging::WARNING ); logging::Logging::instance()->setFileLogLevel( logging::Logging::WARNING );
......
...@@ -243,7 +243,7 @@ void runTests(const std::string & filename, size_t xSize, size_t ySize, size_t z ...@@ -243,7 +243,7 @@ void runTests(const std::string & filename, size_t xSize, size_t ySize, size_t z
WALBERLA_CHECK_EQUAL( ySize, geometryFile.ySize() ); WALBERLA_CHECK_EQUAL( ySize, geometryFile.ySize() );
WALBERLA_CHECK_EQUAL( zSize, geometryFile.zSize() ); WALBERLA_CHECK_EQUAL( zSize, geometryFile.zSize() );
numDefaultConstructedElements = std::count( data.begin(), data.end(), 7 ); numDefaultConstructedElements = std::count( data.begin(), data.end(), numeric_cast<T>(7) );
WALBERLA_CHECK_EQUAL( numCells, numDefaultConstructedElements ); WALBERLA_CHECK_EQUAL( numCells, numDefaultConstructedElements );
data.clear(); data.clear();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment