Skip to content

Commit 44e4a9c

Browse files
wavexxthinkyhead
authored andcommitted
🎨 Remove non-const compare operators (MarlinFirmware#24810)
1 parent 215fcef commit 44e4a9c

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

Marlin/src/core/types.h

-12
Original file line numberDiff line numberDiff line change
@@ -436,15 +436,9 @@ struct XYval {
436436
FI XYval<T>& operator<<=(const int &v) { _LS(x); _LS(y); return *this; }
437437

438438
// Exact comparisons. For floats a "NEAR" operation may be better.
439-
FI bool operator==(const XYval<T> &rs) { return x == rs.x && y == rs.y; }
440-
FI bool operator==(const XYZval<T> &rs) { return x == rs.x && y == rs.y; }
441-
FI bool operator==(const XYZEval<T> &rs) { return x == rs.x && y == rs.y; }
442439
FI bool operator==(const XYval<T> &rs) const { return x == rs.x && y == rs.y; }
443440
FI bool operator==(const XYZval<T> &rs) const { return x == rs.x && y == rs.y; }
444441
FI bool operator==(const XYZEval<T> &rs) const { return x == rs.x && y == rs.y; }
445-
FI bool operator!=(const XYval<T> &rs) { return !operator==(rs); }
446-
FI bool operator!=(const XYZval<T> &rs) { return !operator==(rs); }
447-
FI bool operator!=(const XYZEval<T> &rs) { return !operator==(rs); }
448442
FI bool operator!=(const XYval<T> &rs) const { return !operator==(rs); }
449443
FI bool operator!=(const XYZval<T> &rs) const { return !operator==(rs); }
450444
FI bool operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
@@ -599,9 +593,7 @@ struct XYZval {
599593
FI XYZval<T>& operator<<=(const int &v) { NUM_AXIS_CODE(_LS(x), _LS(y), _LS(z), _LS(i), _LS(j), _LS(k), _LS(u), _LS(v), _LS(w)); return *this; }
600594

601595
// Exact comparisons. For floats a "NEAR" operation may be better.
602-
FI bool operator==(const XYZEval<T> &rs) { return true NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
603596
FI bool operator==(const XYZEval<T> &rs) const { return true NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
604-
FI bool operator!=(const XYZEval<T> &rs) { return !operator==(rs); }
605597
FI bool operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
606598
};
607599

@@ -750,13 +742,9 @@ struct XYZEval {
750742
FI XYZEval<T>& operator<<=(const int &v) { LOGICAL_AXIS_CODE(_LS(e), _LS(x), _LS(y), _LS(z), _LS(i), _LS(j), _LS(k), _LS(u), _LS(v), _LS(w)); return *this; }
751743

752744
// Exact comparisons. For floats a "NEAR" operation may be better.
753-
FI bool operator==(const XYZval<T> &rs) { return true NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
754745
FI bool operator==(const XYZval<T> &rs) const { return true NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
755-
FI bool operator==(const XYZEval<T> &rs) { return true LOGICAL_AXIS_GANG(&& e == rs.e, && x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
756746
FI bool operator==(const XYZEval<T> &rs) const { return true LOGICAL_AXIS_GANG(&& e == rs.e, && x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
757-
FI bool operator!=(const XYZval<T> &rs) { return !operator==(rs); }
758747
FI bool operator!=(const XYZval<T> &rs) const { return !operator==(rs); }
759-
FI bool operator!=(const XYZEval<T> &rs) { return !operator==(rs); }
760748
FI bool operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
761749
};
762750

0 commit comments

Comments
 (0)