Skip to content

Commit

Permalink
Code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Apr 12, 2024
1 parent cc5e1b3 commit cccbfe3
Show file tree
Hide file tree
Showing 9 changed files with 286 additions and 283 deletions.
6 changes: 5 additions & 1 deletion include/geometry/closed_polyline.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class ClosedPolyline : public Polyline
bool explicitely_closed_{ false };

public:
ClosedPolyline() = default;
ClosedPolyline(bool explicitely_closed = false)
: Polyline()
, explicitely_closed_(explicitely_closed)
{
}

ClosedPolyline(const ClosedPolyline& other) = default;

Expand Down
20 changes: 4 additions & 16 deletions include/geometry/polygon.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ class AngleDegrees;
class Polygon : public ClosedPolyline
{
public:
Polygon() = default;
Polygon(bool explicitely_closed = false)
: ClosedPolyline(explicitely_closed)
{
}

Polygon(const Polygon& other) = default;

Expand Down Expand Up @@ -174,19 +177,4 @@ class Polygon : public ClosedPolyline

} // namespace cura

namespace std
{
#if 0
template<>
struct hash<cura::Polygon*>
{
size_t operator()(const cura::PolygonPointer& poly) const
{
const cura::ConstPolygonRef ref = *static_cast<cura::PolygonPointer>(poly);
return std::hash<const ClipperLib::Path*>()(&*ref);
}
};
#endif
} // namespace std

#endif // GEOMETRY_POLYGON_H
15 changes: 0 additions & 15 deletions include/geometry/shape.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,19 +316,4 @@ class Shape : public LinesSet<Polygon>

} // namespace cura

namespace std
{
#if 0
template<>
struct hash<cura::Polygon*>
{
size_t operator()(const cura::PolygonPointer& poly) const
{
const cura::ConstPolygonRef ref = *static_cast<cura::PolygonPointer>(poly);
return std::hash<const ClipperLib::Path*>()(&*ref);
}
};
#endif
} // namespace std

#endif // GEOMETRY_SHAPE_H
4 changes: 3 additions & 1 deletion include/support.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <cstddef>
#include <vector>

#include "geometry/polygon.h"
#include "settings/types/LayerIndex.h"
#include "utils/Coord_t.h"

namespace cura
{
Expand All @@ -17,6 +17,8 @@ class Settings;
class SliceDataStorage;
class SliceMeshStorage;
class Slicer;
class Polygon;
class Shape;

class AreaSupport
{
Expand Down
Loading

0 comments on commit cccbfe3

Please sign in to comment.