Skip to content

Commit 5eabedc

Browse files
committed
Removed unnecessary semicolons to avoid -Wextra-semi warnings
1 parent 77f5f63 commit 5eabedc

7 files changed

Lines changed: 29 additions & 29 deletions

File tree

CPP/Clipper2Lib/include/clipper2/clipper.core.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ namespace Clipper2Lib
138138
}
139139
}
140140

141-
explicit Point() : x(0), y(0), z(0) {};
141+
explicit Point() : x(0), y(0), z(0) {}
142142

143143
template <typename T2>
144144
Point(const T2 x_, const T2 y_, const z_type z_ = 0)
@@ -190,7 +190,7 @@ namespace Clipper2Lib
190190
}
191191
}
192192

193-
explicit Point() : x(0), y(0) {};
193+
explicit Point() : x(0), y(0) {}
194194

195195
template <typename T2>
196196
Point(const T2 x_, const T2 y_) { Init(x_, y_); }
@@ -367,13 +367,13 @@ namespace Clipper2Lib
367367
bottom *= scale;
368368
}
369369

370-
bool IsEmpty() const { return bottom <= top || right <= left; };
370+
bool IsEmpty() const { return bottom <= top || right <= left; }
371371

372372
bool Intersects(const Rect<T>& rec) const
373373
{
374374
return ((std::max)(left, rec.left) <= (std::min)(right, rec.right)) &&
375375
((std::max)(top, rec.top) <= (std::min)(bottom, rec.bottom));
376-
};
376+
}
377377

378378
bool operator==(const Rect<T>& other) const {
379379
return left == other.left && right == other.right &&
@@ -707,7 +707,7 @@ namespace Clipper2Lib
707707
bool operator==(const UInt128Struct& other) const
708708
{
709709
return lo == other.lo && hi == other.hi;
710-
};
710+
}
711711

712712
};
713713

CPP/Clipper2Lib/include/clipper2/clipper.engine.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ namespace Clipper2Lib {
9393
if (splits) delete splits;
9494
// nb: don't delete the split pointers
9595
// as these are owned by ClipperBase's outrec_list_
96-
};
96+
}
9797
};
9898

9999
///////////////////////////////////////////////////////////////////
@@ -156,7 +156,7 @@ namespace Clipper2Lib {
156156
struct HorzJoin {
157157
OutPt* op1 = nullptr;
158158
OutPt* op2 = nullptr;
159-
HorzJoin() {};
159+
HorzJoin() {}
160160
explicit HorzJoin(OutPt* ltr, OutPt* rtl) : op1(ltr), op2(rtl) { }
161161
};
162162

@@ -276,11 +276,11 @@ namespace Clipper2Lib {
276276
void AddPaths(const Paths64& paths, PathType polytype, bool is_open);
277277
public:
278278
virtual ~ClipperBase();
279-
int ErrorCode() const { return error_code_; };
280-
void PreserveCollinear(bool val) { preserve_collinear_ = val; };
281-
bool PreserveCollinear() const { return preserve_collinear_;};
282-
void ReverseSolution(bool val) { reverse_solution_ = val; };
283-
bool ReverseSolution() const { return reverse_solution_; };
279+
int ErrorCode() const { return error_code_; }
280+
void PreserveCollinear(bool val) { preserve_collinear_ = val; }
281+
bool PreserveCollinear() const { return preserve_collinear_;}
282+
void ReverseSolution(bool val) { reverse_solution_ = val; }
283+
bool ReverseSolution() const { return reverse_solution_; }
284284
void Clear();
285285
void AddReuseableData(const ReuseableDataContainer64& reuseable_data);
286286
#ifdef USINGZ
@@ -300,7 +300,7 @@ namespace Clipper2Lib {
300300
PolyPath* parent_;
301301
public:
302302
PolyPath(PolyPath* parent = nullptr): parent_(parent){}
303-
virtual ~PolyPath() {};
303+
virtual ~PolyPath() {}
304304
//https://en.cppreference.com/w/cpp/language/rule_of_three
305305
PolyPath(const PolyPath&) = delete;
306306
PolyPath& operator=(const PolyPath&) = delete;
@@ -371,7 +371,7 @@ namespace Clipper2Lib {
371371
return childs_.size();
372372
}
373373

374-
const Path64& Polygon() const { return polygon_; };
374+
const Path64& Polygon() const { return polygon_; }
375375

376376
double Area() const
377377
{
@@ -446,7 +446,7 @@ namespace Clipper2Lib {
446446
return childs_.size();
447447
}
448448

449-
const PathD& Polygon() const { return polygon_; };
449+
const PathD& Polygon() const { return polygon_; }
450450

451451
double Area() const
452452
{
@@ -537,7 +537,7 @@ namespace Clipper2Lib {
537537
}
538538

539539
#ifdef USINGZ
540-
void SetZCallback(ZCallbackD cb) { zCallbackD_ = cb; };
540+
void SetZCallback(ZCallbackD cb) { zCallbackD_ = cb; }
541541

542542
void ZCB(const Point64& e1bot, const Point64& e1top,
543543
const Point64& e2bot, const Point64& e2top, Point64& pt)
@@ -553,7 +553,7 @@ namespace Clipper2Lib {
553553
PointD e2t = PointD(e2top) * invScale_;
554554
zCallbackD_(e1b,e1t, e2b, e2t, tmp);
555555
pt.z = tmp.z; // only update 'z'
556-
};
556+
}
557557

558558
void CheckCallback()
559559
{

CPP/Clipper2Lib/include/clipper2/clipper.minkowski.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace Clipper2Lib
6060
quad.emplace_back(tmp[i][h]);
6161
quad.emplace_back(tmp[i][j]);
6262
quad.emplace_back(tmp[g][j]);
63-
};
63+
}
6464
if (!IsPositive(quad))
6565
std::reverse(quad.begin(), quad.end());
6666
result.emplace_back(std::move(quad));

CPP/Clipper2Lib/include/clipper2/clipper.offset.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ class ClipperOffset {
8888
bool reverse_solution = false) :
8989
miter_limit_(miter_limit), arc_tolerance_(arc_tolerance),
9090
preserve_collinear_(preserve_collinear),
91-
reverse_solution_(reverse_solution) { };
91+
reverse_solution_(reverse_solution) { }
9292

93-
~ClipperOffset() { Clear(); };
93+
~ClipperOffset() { Clear(); }
9494

95-
int ErrorCode() const { return error_code_; };
95+
int ErrorCode() const { return error_code_; }
9696
void AddPath(const Path64& path, JoinType jt_, EndType et_);
9797
void AddPaths(const Paths64& paths, JoinType jt_, EndType et_);
98-
void Clear() { groups_.clear(); norms.clear(); };
98+
void Clear() { groups_.clear(); norms.clear(); }
9999

100100
void Execute(double delta, Paths64& sols_64);
101101
void Execute(double delta, PolyTree64& polytree);

CPP/Clipper2Lib/include/clipper2/clipper.rectclip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ namespace Clipper2Lib
7272
void ExecuteInternal(const Path64& path);
7373
Path64 GetPath(OutPt2*& op);
7474
public:
75-
explicit RectClipLines64(const Rect64& rect) : RectClip64(rect) {};
75+
explicit RectClipLines64(const Rect64& rect) : RectClip64(rect) {}
7676
Paths64 Execute(const Paths64& paths);
7777
};
7878

CPP/Utils/Colors.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ struct Hsl {
88
uint8_t hue = 0;
99
uint8_t sat = 0;
1010
uint8_t lum = 0;
11-
Hsl() {};
11+
Hsl() {}
1212
Hsl(uint8_t a, uint8_t h, uint8_t s, uint8_t l) :
13-
alpha(a), hue(h), sat(s), lum(l) {};
13+
alpha(a), hue(h), sat(s), lum(l) {}
1414
};
1515

1616
union Color32 {

CPP/Utils/clipper.svg.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Clipper2Lib {
3030
paths_(paths), is_open_path(is_open), fillrule_(fillrule),
3131
brush_color_(brush_clr), pen_color_(pen_clr),
3232
pen_width_(pen_width), show_coords_(show_coords) {
33-
};
33+
}
3434
friend class SvgWriter;
3535
friend class SvgReader;
3636
};
@@ -63,7 +63,7 @@ namespace Clipper2Lib {
6363
unsigned weight, unsigned size, double coord_x, double coord_y) :
6464
text(txt), font_name(fnt_name), font_color(color), font_weight(weight), font_size(size),
6565
x(coord_x), y(coord_y) {
66-
};
66+
}
6767
friend class SvgWriter;
6868
};
6969

@@ -84,9 +84,9 @@ namespace Clipper2Lib {
8484
coords_style.font_color = 0xFF000000;
8585
coords_style.font_size = 11;
8686
scale_ = std::pow(10, precision);
87-
};
87+
}
8888

89-
~SvgWriter() { Clear(); };
89+
~SvgWriter() { Clear(); }
9090

9191
void Clear();
9292
FillRule Fill_Rule() const { return fill_rule_; }

0 commit comments

Comments
 (0)