瀏覽代碼

🧑‍💻 Add operator== for C++20

Scott Lahteine 2 年之前
父節點
當前提交
e42cbe7500
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      Marlin/src/core/types.h

+ 4
- 0
Marlin/src/core/types.h 查看文件

@@ -752,8 +752,12 @@ struct XYZEval {
752 752
   // Exact comparisons. For floats a "NEAR" operation may be better.
753 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 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); }
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); }
755 757
   FI bool        operator!=(const XYZval<T>  &rs)         { return !operator==(rs); }
756 758
   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); }
757 761
 };
758 762
 
759 763
 #undef _RECIP

Loading…
取消
儲存