mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-22 10:34:02 +00:00
Fix compiler problems:
We couldn't automatically cast IPixels to floats under GCC, so just add explicit comparison operators for these pixels so that they work with the googletest macros.
This commit is contained in:
parent
e8b58e3fd0
commit
d85b0d1add
2 changed files with 9 additions and 1 deletions
|
@ -79,6 +79,14 @@ class IPixel : public VectorBase<float, 1> {
|
||||||
void Unpack(uint32 rgba);
|
void Unpack(uint32 rgba);
|
||||||
|
|
||||||
void MakeOpaque() { /* Do nothing.. */ }
|
void MakeOpaque() { /* Do nothing.. */ }
|
||||||
|
|
||||||
|
bool operator==(const IPixel &other) const {
|
||||||
|
return static_cast<float>(*this) == static_cast<float>(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator!=(const IPixel &other) const {
|
||||||
|
return static_cast<float>(*this) != static_cast<float>(other);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
REGISTER_VECTOR_TYPE(IPixel);
|
REGISTER_VECTOR_TYPE(IPixel);
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,7 @@ TEST(Image, IDCT) {
|
||||||
// First make sure they're different
|
// First make sure they're different
|
||||||
for (uint32 j = 0; j < h; ++j) {
|
for (uint32 j = 0; j < h; ++j) {
|
||||||
for (uint32 i = 0; i < w; ++i) {
|
for (uint32 i = 0; i < w; ++i) {
|
||||||
EXPECT_PRED2(std::not_equal_to<float>(), img(i, j), orig(i, j));
|
EXPECT_NE(img(i, j), orig(i, j));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue