diff --git a/Base/include/FasTC/IPixel.h b/Base/include/FasTC/IPixel.h index dedf271..97d49ba 100644 --- a/Base/include/FasTC/IPixel.h +++ b/Base/include/FasTC/IPixel.h @@ -79,6 +79,14 @@ class IPixel : public VectorBase { void Unpack(uint32 rgba); void MakeOpaque() { /* Do nothing.. */ } + + bool operator==(const IPixel &other) const { + return static_cast(*this) == static_cast(other); + } + + bool operator!=(const IPixel &other) const { + return static_cast(*this) != static_cast(other); + } }; REGISTER_VECTOR_TYPE(IPixel); diff --git a/Base/test/TestImage.cpp b/Base/test/TestImage.cpp index d099ceb..72778af 100644 --- a/Base/test/TestImage.cpp +++ b/Base/test/TestImage.cpp @@ -265,7 +265,7 @@ TEST(Image, IDCT) { // First make sure they're different for (uint32 j = 0; j < h; ++j) { for (uint32 i = 0; i < w; ++i) { - EXPECT_PRED2(std::not_equal_to(), img(i, j), orig(i, j)); + EXPECT_NE(img(i, j), orig(i, j)); } }