build: clear 2 warnings - sites GCC reports and Clang does not (#15597)

Both are in our own code and neither shows up in a clang-cl or clang census,
so the Windows and CI matrices have never reported them.

FillRectilinear.cpp draws two trapezoid diagrams whose lines end in a
backslash, which continues a // comment onto the next line. GCC calls that a
multi-line comment. The diagrams are now block comments, where the rule does
not apply, and the drawings are unchanged.

CutObjectBase has a user-provided operator= and a virtual destructor, either
of which deprecates its implicitly generated copy constructor. bbs_3mf.cpp
copies the type through CutObjectInfo. The copy constructor is now declared
and defaulted, leaving the class with no implicit copy member. Move
operations were already suppressed by the user-provided operator=, so nothing
changes there.
This commit is contained in:
Kris Austin
2026-09-09 05:45:25 -05:00
committed by GitHub
parent c70a613548
commit a3c9041c10
2 changed files with 15 additions and 8 deletions

View File

@@ -3090,10 +3090,11 @@ bool FillRectilinear::fill_surface_trapezoidal(
case 0: // Grid / Trapezoidal case 0: // Grid / Trapezoidal
{ {
// Generate a non-crossing trapezoidal pattern to avoid overextrusion at intersections when `multiline > 1`. // Generate a non-crossing trapezoidal pattern to avoid overextrusion at intersections when `multiline > 1`.
// P2--P3 /*
// / \ * P2--P3
// P0_P1/ \P4_ * / \
// * P0_P1/ \P4_
*/
// P0xP1x=P4xP0x=d1/2 // P0xP1x=P4xP0x=d1/2
// P2xP3x=d1 // P2xP3x=d1
// P1yP2y=P2yP3y=d2 // P1yP2y=P2yP3y=d2
@@ -3171,10 +3172,12 @@ bool FillRectilinear::fill_surface_trapezoidal(
case 1: // Triangular case 1: // Triangular
{ {
// Generate a non-crossing trapezoidal pattern with a base line below. // Generate a non-crossing trapezoidal pattern with a base line below.
// P1-P2 /*
// / \ * P1-P2
// P0/ \P3_P4 * / \
// ---------------- * P0/ \P3_P4
* ----------------
*/
// P1xP2x=P3xP4x=d2 // P1xP2x=P3xP4x=d2
// P0yP1y=P2yP3y=h-2d1 // P0yP1y=P2yP3y=h-2d1
// //

View File

@@ -170,6 +170,10 @@ public:
this->m_check_sum = rhs.check_sum(); this->m_check_sum = rhs.check_sum();
this->m_connectors_cnt = rhs.connectors_cnt(); this->m_connectors_cnt = rhs.connectors_cnt();
} }
// A user-declared copy assignment or destructor deprecates the implicitly generated
// copy constructor, and this class has both, so declare it rather than rely on it.
CutObjectBase(const CutObjectBase &) = default;
CutObjectBase &operator=(const CutObjectBase &other) CutObjectBase &operator=(const CutObjectBase &other)
{ {
this->copy(other); this->copy(other);