From 51117d755939e548a9541c495121cb9a6a1de89a Mon Sep 17 00:00:00 2001 From: toni Date: Wed, 18 Sep 2019 10:47:48 +0200 Subject: [PATCH] fixed silly compiler issues under linux and gcc --- code/CMakeLists.txt | 4 ++-- code/Plotta.h | 6 +++--- code/main.cpp | 6 +++--- code/mainFtm.cpp | 8 ++++---- code/trilateration.h | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index ac533f1..c33101e 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -69,9 +69,9 @@ else() # system specific compiler flags ADD_DEFINITIONS( - #-std=gnu++14 + -std=gnu++17 - -lstdc++fs + #-lstdc++fs -Wall -Werror=return-type diff --git a/code/Plotta.h b/code/Plotta.h index fb3fe9b..395de2c 100644 --- a/code/Plotta.h +++ b/code/Plotta.h @@ -136,14 +136,14 @@ namespace Plotta } template<> - static plottastream& operator<<(plottastream& stream, const float& value) + inline plottastream& operator<<(plottastream& stream, const float& value) { return stream << (isnan(value) ? "float(\"nan\")" : std::to_string(value)); } template<> - static plottastream& operator<<(plottastream& stream, const Point2& value) + inline plottastream& operator<<(plottastream& stream, const Point2& value) { return stream << std::initializer_list{ value.x, value.y }; } -} \ No newline at end of file +} diff --git a/code/main.cpp b/code/main.cpp index f209a13..0fb9d72 100644 --- a/code/main.cpp +++ b/code/main.cpp @@ -204,11 +204,11 @@ static Stats::Statistics run(Settings::DataSetup setup, int walkIdx, std: // error file const long int t = static_cast(time(NULL)); - auto evalDir = std::experimental::filesystem::path(Settings::errorDir); + auto evalDir = std::filesystem::path(Settings::errorDir); evalDir.append(folder); - if (!std::experimental::filesystem::exists(evalDir)) { - std::experimental::filesystem::create_directory(evalDir); + if (!std::filesystem::exists(evalDir)) { + std::filesystem::create_directory(evalDir); } std::ofstream errorFile; diff --git a/code/mainFtm.cpp b/code/mainFtm.cpp index 0e36496..3d93aad 100644 --- a/code/mainFtm.cpp +++ b/code/mainFtm.cpp @@ -53,11 +53,11 @@ static Stats::Statistics run(Settings::DataSetup setup, int numFile, std: // error file const long int t = static_cast(time(NULL)); - auto evalDir = std::experimental::filesystem::path(Settings::errorDir); + auto evalDir = std::filesystem::path(Settings::errorDir); evalDir.append(folder); - if (!std::experimental::filesystem::exists(evalDir)) { - std::experimental::filesystem::create_directory(evalDir); + if (!std::filesystem::exists(evalDir)) { + std::filesystem::create_directory(evalDir); } std::ofstream errorFile; @@ -201,7 +201,7 @@ static Stats::Statistics run(Settings::DataSetup setup, int numFile, std: plot.addEstimationNode(est.pos.pos); plot.setActivity((int) act.get()); plot.splot.getView().setCamera(0, 0); - plot.splot.getView().setEqualXY(true); + //plot.splot.getView().setEqualXY(true); plot.plot(); diff --git a/code/trilateration.h b/code/trilateration.h index ce408d9..cb4dbce 100644 --- a/code/trilateration.h +++ b/code/trilateration.h @@ -5,8 +5,8 @@ #include -#include "..\Indoor\geo\Point2.h" -#include "..\Indoor\geo\Point3.h" +#include +#include namespace Trilateration { @@ -92,4 +92,4 @@ namespace Trilateration return Point3(location.x(), location.y(), location.z()); } -} \ No newline at end of file +}