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
   FI XYval<T>& operator<<=(const int &v)                { _LS(x);    _LS(y);    return *this; }
436
   FI XYval<T>& operator<<=(const int &v)                { _LS(x);    _LS(y);    return *this; }
437
 
437
 
438
   // Exact comparisons. For floats a "NEAR" operation may be better.
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
   FI bool      operator==(const XYval<T>   &rs)   const { return x == rs.x && y == rs.y; }
439
   FI bool      operator==(const XYval<T>   &rs)   const { return x == rs.x && y == rs.y; }
443
   FI bool      operator==(const XYZval<T>  &rs)   const { return x == rs.x && y == rs.y; }
440
   FI bool      operator==(const XYZval<T>  &rs)   const { return x == rs.x && y == rs.y; }
444
   FI bool      operator==(const XYZEval<T> &rs)   const { return x == rs.x && y == rs.y; }
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
   FI bool      operator!=(const XYval<T>   &rs)   const { return !operator==(rs); }
442
   FI bool      operator!=(const XYval<T>   &rs)   const { return !operator==(rs); }
449
   FI bool      operator!=(const XYZval<T>  &rs)   const { return !operator==(rs); }
443
   FI bool      operator!=(const XYZval<T>  &rs)   const { return !operator==(rs); }
450
   FI bool      operator!=(const XYZEval<T> &rs)   const { return !operator==(rs); }
444
   FI bool      operator!=(const XYZEval<T> &rs)   const { return !operator==(rs); }
599
   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; }
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
   // Exact comparisons. For floats a "NEAR" operation may be better.
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
   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); }
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
   FI bool       operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
597
   FI bool       operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
606
 };
598
 };
607
 
599
 
750
   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; }
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
   // Exact comparisons. For floats a "NEAR" operation may be better.
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
   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); }
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
   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); }
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
   FI bool        operator!=(const XYZval<T>  &rs)   const { return !operator==(rs); }
747
   FI bool        operator!=(const XYZval<T>  &rs)   const { return !operator==(rs); }
759
-  FI bool        operator!=(const XYZEval<T> &rs)         { return !operator==(rs); }
760
   FI bool        operator!=(const XYZEval<T> &rs)   const { return !operator==(rs); }
748
   FI bool        operator!=(const XYZEval<T> &rs)   const { return !operator==(rs); }
761
 };
749
 };
762
 
750
 

Loading…
Cancel
Save