From 2bbd43c373ff8aebf062bc53e885c99f1ec11210 Mon Sep 17 00:00:00 2001 From: Benjamin Landers Date: Wed, 25 Jul 2018 00:34:20 -0700 Subject: [PATCH] Fix two compilation issues One was due to enums not having a std::hash below c++17 The other was due to overloaded methods prefering ones in the same namespace (I think) --- src/GUI/OptionsGroup/UI_Slider.cpp | 2 +- src/test/test_data.cpp | 2 +- src/test/test_data.hpp | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/GUI/OptionsGroup/UI_Slider.cpp b/src/GUI/OptionsGroup/UI_Slider.cpp index de6410d95..4745a8f00 100644 --- a/src/GUI/OptionsGroup/UI_Slider.cpp +++ b/src/GUI/OptionsGroup/UI_Slider.cpp @@ -73,7 +73,7 @@ int UI_Slider::get_int() { } std::string UI_Slider::get_string() { - return trim_zeroes(std::to_string(static_cast(this->_slider->GetValue()) / this->_scale)); + return _trim_zeroes(std::to_string(static_cast(this->_slider->GetValue()) / this->_scale)); } void UI_Slider::set_scale(size_t new_scale) { diff --git a/src/test/test_data.cpp b/src/test/test_data.cpp index 23be026df..62f8923fb 100644 --- a/src/test/test_data.cpp +++ b/src/test/test_data.cpp @@ -12,7 +12,7 @@ using namespace std; namespace Slic3r { namespace Test { // Mesh enumeration to name mapping -const std::unordered_map mesh_names { +const std::unordered_map mesh_names { std::make_pair(TestMesh::A,"A"), std::make_pair(TestMesh::L,"L"), std::make_pair(TestMesh::V,"V"), diff --git a/src/test/test_data.hpp b/src/test/test_data.hpp index 02f160cbd..e5ea24e93 100644 --- a/src/test/test_data.hpp +++ b/src/test/test_data.hpp @@ -33,8 +33,15 @@ enum class TestMesh { two_hollow_squares }; +// Neccessary for (tm); + } +}; + /// Mesh enumeration to name mapping -extern const std::unordered_map mesh_names; +extern const std::unordered_map mesh_names; /// Port of Slic3r::Test::mesh /// Basic cubes/boxes should call TriangleMesh::make_cube() directly and rescale/translate it