From 533a2314fd1f7f1e7f6d24c14d90d47152fe29b2 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sun, 22 Jul 2018 11:55:33 -0500 Subject: [PATCH] Fixed includes on OSX and silenced override warnings. --- src/GUI/GUI.hpp | 2 +- src/GUI/OptionsGroup/Field.hpp | 10 +++++----- src/GUI/Scene3D.cpp | 6 ++++-- xs/src/libslic3r/ConfigBase.hpp | 8 ++++---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/GUI/GUI.hpp b/src/GUI/GUI.hpp index 11b497852..a5a090146 100644 --- a/src/GUI/GUI.hpp +++ b/src/GUI/GUI.hpp @@ -17,7 +17,7 @@ namespace Slic3r { namespace GUI { class App: public wxApp { public: - virtual bool OnInit(); + virtual bool OnInit() override; App() : wxApp() {} /// Save position, size, and maximize state for a TopLevelWindow (includes Frames) by name in Settings. diff --git a/src/GUI/OptionsGroup/Field.hpp b/src/GUI/OptionsGroup/Field.hpp index ccfab0fdb..77032d3dc 100644 --- a/src/GUI/OptionsGroup/Field.hpp +++ b/src/GUI/OptionsGroup/Field.hpp @@ -127,7 +127,7 @@ public: protected: virtual std::string LogChannel() override { return "UI_Checkbox"s; } - void _on_change(std::string opt_id) { + void _on_change(std::string opt_id) override { if (!this->disable_change_event && this->window->IsEnabled() && this->on_change != nullptr) { this->on_change(opt_id, this->get_bool()); } @@ -241,7 +241,7 @@ public: protected: virtual std::string LogChannel() override { return "UI_Choice"s; } - void _on_change(std::string opt_id) { + void _on_change(std::string opt_id) override { if (!this->disable_change_event && this->window->IsEnabled() && this->on_change != nullptr) { this->on_change(opt_id, this->get_string()); } @@ -283,7 +283,7 @@ protected: void _set_value(double value, bool show_value = false); void _set_value(std::string value); - void _on_change(std::string opt_id) { + void _on_change(std::string opt_id) override { if (!this->disable_change_event && this->window->IsEnabled() && this->on_change != nullptr) { this->on_change(opt_id, this->get_string()); } @@ -298,7 +298,7 @@ public: UI_Point(wxWindow* _parent, Slic3r::ConfigOptionDef _opt); ~UI_Point() { _lbl_x->Destroy(); _lbl_y->Destroy(); _ctrl_x->Destroy(); _ctrl_y->Destroy(); } - std::string get_string(); + std::string get_string() override; void set_value(boost::any value) override; //< Implements set_value @@ -347,7 +347,7 @@ class UI_Point3 : public UI_Sizer { public: UI_Point3(wxWindow* _parent, Slic3r::ConfigOptionDef _opt); ~UI_Point3() { _lbl_x->Destroy(); _lbl_y->Destroy(); _ctrl_x->Destroy(); _ctrl_y->Destroy(); _lbl_z->Destroy(); _ctrl_z->Destroy(); } - std::string get_string(); + std::string get_string() override; void set_value(boost::any value) override; //< Implements set_value diff --git a/src/GUI/Scene3D.cpp b/src/GUI/Scene3D.cpp index d1c560a2a..3fbb06137 100644 --- a/src/GUI/Scene3D.cpp +++ b/src/GUI/Scene3D.cpp @@ -2,9 +2,11 @@ #include "Line.hpp" #include "ClipperUtils.hpp" #include "misc_ui.hpp" - +#ifdef __APPLE__ +#include +#else #include - +#endif namespace Slic3r { namespace GUI { Scene3D::Scene3D(wxWindow* parent, const wxSize& size) : diff --git a/xs/src/libslic3r/ConfigBase.hpp b/xs/src/libslic3r/ConfigBase.hpp index b86f9de87..89b61fdcf 100644 --- a/xs/src/libslic3r/ConfigBase.hpp +++ b/xs/src/libslic3r/ConfigBase.hpp @@ -102,7 +102,7 @@ class ConfigOptionFloat : public ConfigOptionSingle public: ConfigOptionFloat() : ConfigOptionSingle(0) {}; ConfigOptionFloat(double _value) : ConfigOptionSingle(_value) {}; - ConfigOptionFloat* clone() const { return new ConfigOptionFloat(this->value); }; + ConfigOptionFloat* clone() const override { return new ConfigOptionFloat(this->value); }; double getFloat() const override { return this->value; }; void setFloat(double val) override { this->value = val; } @@ -199,7 +199,7 @@ class ConfigOptionInts : public ConfigOptionVector ConfigOptionInts(const std::vector _values) : ConfigOptionVector(_values) {}; ConfigOptionInts* clone() const override { return new ConfigOptionInts(this->values); }; - std::string serialize() const { + std::string serialize() const override { std::ostringstream ss; for (std::vector::const_iterator it = this->values.begin(); it != this->values.end(); ++it) { if (it - this->values.begin() != 0) ss << ","; @@ -208,7 +208,7 @@ class ConfigOptionInts : public ConfigOptionVector return ss.str(); }; - std::vector vserialize() const { + std::vector vserialize() const override { std::vector vv; vv.reserve(this->values.size()); for (std::vector::const_iterator it = this->values.begin(); it != this->values.end(); ++it) { @@ -219,7 +219,7 @@ class ConfigOptionInts : public ConfigOptionVector return vv; }; - bool deserialize(std::string str, bool append = false) { + bool deserialize(std::string str, bool append = false) override { if (!append) this->values.clear(); std::istringstream is(str); std::string item_str;