WIP: Fixed some compilation issues on OSX, fixed some "override" vs. "virtual"

warnings.
This commit is contained in:
bubnikv 2020-03-04 12:48:04 +01:00
parent cbe9216d79
commit ab7109568a
5 changed files with 14 additions and 14 deletions

View File

@ -40,7 +40,7 @@ public:
~ExtrusionEntityCollection() { clear(); } ~ExtrusionEntityCollection() { clear(); }
explicit operator ExtrusionPaths() const; explicit operator ExtrusionPaths() const;
bool is_collection() const { return true; } bool is_collection() const override { return true; }
ExtrusionRole role() const override { ExtrusionRole role() const override {
ExtrusionRole out = erNone; ExtrusionRole out = erNone;
for (const ExtrusionEntity *ee : entities) { for (const ExtrusionEntity *ee : entities) {
@ -49,7 +49,7 @@ public:
} }
return out; return out;
} }
bool can_reverse() const { return !this->no_sort; } bool can_reverse() const override { return !this->no_sort; }
bool empty() const { return this->entities.empty(); } bool empty() const { return this->entities.empty(); }
void clear(); void clear();
void swap (ExtrusionEntityCollection &c); void swap (ExtrusionEntityCollection &c);
@ -83,9 +83,9 @@ public:
static ExtrusionEntityCollection chained_path_from(const ExtrusionEntitiesPtr &extrusion_entities, const Point &start_near, ExtrusionRole role = erMixed); static ExtrusionEntityCollection chained_path_from(const ExtrusionEntitiesPtr &extrusion_entities, const Point &start_near, ExtrusionRole role = erMixed);
ExtrusionEntityCollection chained_path_from(const Point &start_near, ExtrusionRole role = erMixed) const ExtrusionEntityCollection chained_path_from(const Point &start_near, ExtrusionRole role = erMixed) const
{ return this->no_sort ? *this : chained_path_from(this->entities, start_near, role); } { return this->no_sort ? *this : chained_path_from(this->entities, start_near, role); }
void reverse(); void reverse() override;
const Point& first_point() const { return this->entities.front()->first_point(); } const Point& first_point() const override { return this->entities.front()->first_point(); }
const Point& last_point() const { return this->entities.back()->last_point(); } const Point& last_point() const override { return this->entities.back()->last_point(); }
// Produce a list of 2D polygons covered by the extruded paths, offsetted by the extrusion width. // Produce a list of 2D polygons covered by the extruded paths, offsetted by the extrusion width.
// Increase the offset by scaled_epsilon to achieve an overlap, so a union will produce no gaps. // Increase the offset by scaled_epsilon to achieve an overlap, so a union will produce no gaps.
void polygons_covered_by_width(Polygons &out, const float scaled_epsilon) const override; void polygons_covered_by_width(Polygons &out, const float scaled_epsilon) const override;
@ -102,7 +102,7 @@ public:
/// You should be iterating over flatten().entities if you are interested in the underlying ExtrusionEntities (and don't care about hierarchy). /// You should be iterating over flatten().entities if you are interested in the underlying ExtrusionEntities (and don't care about hierarchy).
/// \param preserve_ordering Flag to method that will flatten if and only if the underlying collection is sortable when True (default: False). /// \param preserve_ordering Flag to method that will flatten if and only if the underlying collection is sortable when True (default: False).
ExtrusionEntityCollection flatten(bool preserve_ordering = false) const; ExtrusionEntityCollection flatten(bool preserve_ordering = false) const;
double min_mm3_per_mm() const; double min_mm3_per_mm() const override;
double total_volume() const override { double volume=0.; for (const auto& ent : entities) volume+=ent->total_volume(); return volume; } double total_volume() const override { double volume=0.; for (const auto& ent : entities) volume+=ent->total_volume(); return volume; }
// Following methods shall never be called on an ExtrusionEntityCollection. // Following methods shall never be called on an ExtrusionEntityCollection.

View File

@ -39,7 +39,7 @@ public:
// last point == first point for polygons // last point == first point for polygons
const Point& last_point() const override { return this->points.front(); } const Point& last_point() const override { return this->points.front(); }
virtual Lines lines() const; Lines lines() const override;
Polyline split_at_vertex(const Point &point) const; Polyline split_at_vertex(const Point &point) const;
// Split a closed polygon into an open polyline, with the split point duplicated at both ends. // Split a closed polygon into an open polyline, with the split point duplicated at both ends.
Polyline split_at_index(int index) const; Polyline split_at_index(int index) const;

View File

@ -65,7 +65,7 @@ public:
const Point& last_point() const override { return this->points.back(); } const Point& last_point() const override { return this->points.back(); }
const Point& leftmost_point() const; const Point& leftmost_point() const;
virtual Lines lines() const; Lines lines() const override;
void clip_end(double distance); void clip_end(double distance);
void clip_start(double distance); void clip_start(double distance);
void extend_end(double distance); void extend_end(double distance);

View File

@ -284,7 +284,7 @@ public:
TextCtrl(wxWindow* parent, const ConfigOptionDef& opt, const t_config_option_key& id) : Field(parent, opt, id) {} TextCtrl(wxWindow* parent, const ConfigOptionDef& opt, const t_config_option_key& id) : Field(parent, opt, id) {}
~TextCtrl() {} ~TextCtrl() {}
void BUILD(); void BUILD() override;
bool value_was_changed(); bool value_was_changed();
// Propagate value from field to the OptionGroupe and Config after kill_focus/ENTER // Propagate value from field to the OptionGroupe and Config after kill_focus/ENTER
void propagate_value(); void propagate_value();
@ -303,9 +303,9 @@ public:
void msw_rescale(bool rescale_sidetext = false) override; void msw_rescale(bool rescale_sidetext = false) override;
virtual void enable(); void enable() override;
virtual void disable(); void disable() override;
virtual wxWindow* getWindow() { return window; } wxWindow* getWindow() override { return window; }
}; };
class CheckBox : public Field { class CheckBox : public Field {

View File

@ -126,7 +126,7 @@ static bool load_driver_functions()
BOOST_LOG_TRIVIAL(error) << "3dx drivers module loading error: "<< dlerror() ; BOOST_LOG_TRIVIAL(error) << "3dx drivers module loading error: "<< dlerror() ;
} }
BOOST_LOG_TRIVIAL(info) << "3dx drivers loaded: "<< driver_loaded ? (has_new_driver ? "YES, new" : "YES, old") : "NO" ; BOOST_LOG_TRIVIAL(info) << "3dx drivers loaded: " << (driver_loaded ? (has_new_driver ? "YES, new" : "YES, old") : "NO");
return driver_loaded; return driver_loaded;
} }
@ -164,7 +164,7 @@ static void DeviceEvent(uint32_t unused, uint32_t msg_type, void *msg_arg)
case kConnexionCmdHandleAxis: { case kConnexionCmdHandleAxis: {
// The axis field is an array of 6 signed 16-bit integers corresponding to the 6 device axes. Data is ordered as Tx, Tz, Ty, Rx, Rz, Ry. The values reported are scaled by the driver according to the speed slider settings on the 3Dconnexion preference panel. At maximum speed, the range is - 1024 to 1024. Typical range that you should optimize your application for should be -500 to 500. // The axis field is an array of 6 signed 16-bit integers corresponding to the 6 device axes. Data is ordered as Tx, Tz, Ty, Rx, Rz, Ry. The values reported are scaled by the driver according to the speed slider settings on the 3Dconnexion preference panel. At maximum speed, the range is - 1024 to 1024. Typical range that you should optimize your application for should be -500 to 500.
// Actually we are getting values way over 1024. Max is probably 2048 now. // Actually we are getting values way over 1024. Max is probably 2048 now.
Mouse3DController::DataPacketAxis packet; Slic3r::GUI::Mouse3DController::DataPacketAxis packet;
for (int i = 0; i < 6; ++ i) for (int i = 0; i < 6; ++ i)
packet[i] = (double)s->axis[i]/350.0;//wanted to divide by 500 but 350 is used at raw input so i used same value. packet[i] = (double)s->axis[i]/350.0;//wanted to divide by 500 but 350 is used at raw input so i used same value.
mouse_3d_controller->handle_input(packet); mouse_3d_controller->handle_input(packet);