Browse Source

🎨 Remove non-const compare operators (#24810)

Yuri D'Elia 1 year ago
parent
commit
644c91ce8b
No account linked to committer's email address
1 changed files with 0 additions and 12 deletions
  1. 0
    12
      Marlin/src/core/types.h

+ 0
- 12
Marlin/src/core/types.h View File

@@ -436,15 +436,9 @@ struct XYval {
436 436
   FI XYval<T>& operator<<=(const int &v)                { _LS(x);    _LS(y);    return *this; }
437 437
 
438 438
   // 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; }
442 439
   FI bool      operator==(const XYval<T>   &rs)   const { return x == rs.x && y == rs.y; }
443 440
   FI bool      operator==(const XYZval<T>  &rs)   const { return x == rs.x && y == rs.y; }
444 441
   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); }
448 442
   FI bool      operator!=(const XYval<T>   &rs)   const { return !operator==(rs); }
449 443
   FI bool      operator!=(const XYZval<T>  &rs)   const { return !operator==(rs); }
450 444
   FI bool      operator!=(const XYZEval<T> &rs)   const { return !operator==(rs); }
@@ -599,9 +593,7 @@ struct XYZval {
599 593
   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; }
600 594
 
601 595
   // 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); }
603 596
   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); }
605 597
   FI bool       operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
606 598
 };
607 599
 
@@ -750,13 +742,9 @@ struct XYZEval {
750 742
   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; }
751 743
 
752 744
   // 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); }
754 745
   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); }
756 746
   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); }
758 747
   FI bool        operator!=(const XYZval<T>  &rs)   const { return !operator==(rs); }
759
-  FI bool        operator!=(const XYZEval<T> &rs)         { return !operator==(rs); }
760 748
   FI bool        operator!=(const XYZEval<T> &rs)   const { return !operator==(rs); }
761 749
 };
762 750
 

Loading…
Cancel
Save