diff --git a/MAC_build_update.sh b/MAC_build_update.sh index 14dcb85e..f680c400 100644 --- a/MAC_build_update.sh +++ b/MAC_build_update.sh @@ -36,6 +36,10 @@ fi echo "Starting compilation process" # Make a build folder +if [ -d build ] +then + rm -r build +fi mkdir build && cd build # Prepare the cmake files diff --git a/logdoctor/games/snake/snake.cpp b/logdoctor/games/snake/snake.cpp index 7f89c35c..a28c5b7c 100644 --- a/logdoctor/games/snake/snake.cpp +++ b/logdoctor/games/snake/snake.cpp @@ -545,6 +545,8 @@ void Snake::collectData( std::vector& data, Direction& direction, const S case Entity::A: blocked_way = 1u; break; + default: + break; } if ( ! blocked_way ) { @@ -842,6 +844,8 @@ const std::vector Snake::checkAround( const Direction& direction, cons case Entity::A: around.at(i) = 2u; break; + default: + break; } } } diff --git a/logdoctor/modules/craplog/craplog.cpp b/logdoctor/modules/craplog/craplog.cpp index 9475a1c2..ad46fa92 100644 --- a/logdoctor/modules/craplog/craplog.cpp +++ b/logdoctor/modules/craplog/craplog.cpp @@ -540,6 +540,8 @@ void Craplog::scanLogsDir() case LogType::Discarded: // skip continue; + default: + break; } std::string hash; diff --git a/logdoctor/modules/craplog/modules/formats.cpp b/logdoctor/modules/craplog/modules/formats.cpp index a7ce503a..4d5d7615 100644 --- a/logdoctor/modules/craplog/modules/formats.cpp +++ b/logdoctor/modules/craplog/modules/formats.cpp @@ -240,7 +240,7 @@ void checkIisString( std::string_view string ) for ( const char& chr : string ) { if ( !(StringOps::isAlnum( chr ) || chr == ' ' || chr == '-' || chr == ',' || chr == ':' || chr == '(' || chr == ')' || chr == '[' || chr == ']') ) { // unwanted character - throw LogFormatException( "Unexpected character found: "+chr ); + throw LogFormatException( "Unexpected character found: "+std::string{chr} ); } } } diff --git a/logdoctor/modules/craplog/modules/worker.h b/logdoctor/modules/craplog/modules/worker.h index 568db8dd..f9851195 100644 --- a/logdoctor/modules/craplog/modules/worker.h +++ b/logdoctor/modules/craplog/modules/worker.h @@ -5,8 +5,12 @@ #include "lib.h" +#include // leave this here for OSX + class QSqlDatabase; +typedef std::unordered_map bw_lists_t; // leave this here for OSX + class CraplogWorker : public QObject { @@ -16,7 +20,6 @@ private: using worker_files_t = std::vector>; using log_line_data_t = std::map; - using bw_lists_t = std::unordered_map; public: diff --git a/logdoctor/modules/crapview/crapview.cpp b/logdoctor/modules/crapview/crapview.cpp index 40561cd6..62985cb2 100644 --- a/logdoctor/modules/crapview/crapview.cpp +++ b/logdoctor/modules/crapview/crapview.cpp @@ -913,7 +913,7 @@ const bool Crapview::calcGlobals( std::vector>& recu traffic_list.push_back( std::make_tuple( std::get<0>(traf_date), QString("%1").arg( std::get<1>(traf_date) ) ) ); // max day of the week - double max{ 0.d }; + double max{ 0.0 }; int max_{ 0 }; for ( const auto& [d,c] : traf_day ) { if ( c > max ) { @@ -921,11 +921,11 @@ const bool Crapview::calcGlobals( std::vector>& recu max_ = d; } } - if ( max_ == 0.d ) { + if ( max_ == 0.0 ) { traffic_list.push_back( std::make_tuple( "-", "0" ) ); } else { const int f{ static_cast(max) }; - const int d{ (max<10.d) ? static_cast(max*100.d)%100 : static_cast(max*10.d)%10 }; + const int d{ (max<10.0) ? static_cast(max*100.0)%100 : static_cast(max*10.0)%10 }; QString count{ QString("%1").arg( f ) }; if ( d > 0 ) { count += QString(".%1").arg( d ); @@ -934,7 +934,7 @@ const bool Crapview::calcGlobals( std::vector>& recu } // max hour of the day - max=0.d, max_=-1.d; + max=0.0, max_=-1.0; for ( const auto& [h,c] : traf_hour ) { if ( c > max ) { max = c; @@ -945,7 +945,7 @@ const bool Crapview::calcGlobals( std::vector>& recu traffic_list.push_back( std::make_tuple( "", "0" ) ); } else { const int f{ static_cast(max) }; - const int d{ (max<10.d) ? static_cast(max*100.d)%100 : static_cast(max*10.d)%10 }; + const int d{ (max<10.0) ? static_cast(max*100.0)%100 : static_cast(max*10.0)%10 }; QString count = QString("%1").arg( f ); if ( d > 0 ) { count += QString(".%1").arg( d ); diff --git a/logdoctor/utilities/result.h b/logdoctor/utilities/result.h index 4b312af7..52955d65 100644 --- a/logdoctor/utilities/result.h +++ b/logdoctor/utilities/result.h @@ -3,6 +3,8 @@ #include "modules/exceptions.h" +#include // leave this here for OSX + //! Result /*!