Skip to content

Commit

Permalink
Add operator!= to Vector components
Browse files Browse the repository at this point in the history
Seems to be necessary to keep podio nightlies working
  • Loading branch information
tmadlener committed Feb 26, 2024
1 parent 7956a12 commit 2db3817
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions edm4hep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ components:
constexpr Vector4f(float xx, float yy, float zz, float tt) : x(xx),y(yy),z(zz),t(tt) {}\n
constexpr Vector4f(const float* v) : x(v[0]),y(v[1]),z(v[2]),t(v[3]) {}\n
constexpr bool operator==(const Vector4f& v) const { return (x==v.x&&y==v.y&&z==v.z&&t==v.t) ; }\n
constexpr bool operator!=(const Vector4f& v) const { return !(*this == v) ; }\n
constexpr float operator[](unsigned i) const { return *( &x + i ) ; }\n
"

Expand All @@ -34,6 +35,7 @@ components:
constexpr Vector3f(float xx, float yy, float zz) : x(xx),y(yy),z(zz) {}\n
constexpr Vector3f(const float* v) : x(v[0]),y(v[1]),z(v[2]) {}\n
constexpr bool operator==(const Vector3f& v) const { return (x==v.x&&y==v.y&&z==v.z) ; }\n
constexpr bool operator!=(const Vector3f& v) const { return !(*this == v) ; }\n
constexpr float operator[](unsigned i) const { return *( &x + i ) ; }\n
"

Expand All @@ -53,6 +55,7 @@ components:
[[ deprecated(\"This constructor will be removed again it is mainly here for an easier transition\") ]]\n
constexpr Vector3d(const Vector3f& v) : x(v.x), y(v.y), z(v.z) {}\n
constexpr bool operator==(const Vector3d& v) const { return (x==v.x&&y==v.y&&z==v.z) ; }\n
constexpr bool operator!=(const Vector3d& v) const { return !(*this == v) ; }\n
constexpr double operator[](unsigned i) const { return *( &x + i ) ; }\n
"

Expand All @@ -67,6 +70,7 @@ components:
constexpr Vector2i(int32_t aa, int32_t bb) : a(aa),b(bb) {}\n
constexpr Vector2i( const int32_t* v) : a(v[0]), b(v[1]) {}\n
constexpr bool operator==(const Vector2i& v) const { return (a==v.a&&b==v.b) ; }\n
constexpr bool operator!=(const Vector2i& v) const { return !(*this == v) ; }\n
constexpr int operator[](unsigned i) const { return *( &a + i ) ; }\n
"

Expand All @@ -81,6 +85,7 @@ components:
constexpr Vector2f(float aa,float bb) : a(aa),b(bb) {}\n
constexpr Vector2f(const float* v) : a(v[0]), b(v[1]) {}\n
constexpr bool operator==(const Vector2f& v) const { return (a==v.a&&b==v.b) ; }\n
constexpr bool operator!=(const Vector2f& v) const { return !(*this == v) ; }\n
constexpr float operator[](unsigned i) const { return *( &a + i ) ; }\n
"

Expand Down

0 comments on commit 2db3817

Please sign in to comment.