diff options
Diffstat (limited to 'src/tests/common/effect_test_helpers.cc')
| -rw-r--r-- | src/tests/common/effect_test_helpers.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tests/common/effect_test_helpers.cc b/src/tests/common/effect_test_helpers.cc index d776609..2a40f60 100644 --- a/src/tests/common/effect_test_helpers.cc +++ b/src/tests/common/effect_test_helpers.cc @@ -45,9 +45,9 @@ bool all_pixels_match_color(const std::vector<uint8_t>& pixels, int width, const uint8_t g = pixels[offset + 1]; const uint8_t r = pixels[offset + 2]; - const int diff_r = static_cast<int>(r) - static_cast<int>(target_r); - const int diff_g = static_cast<int>(g) - static_cast<int>(target_g); - const int diff_b = static_cast<int>(b) - static_cast<int>(target_b); + const int diff_r = (int)(r) - (int)(target_r); + const int diff_g = (int)(g) - (int)(target_g); + const int diff_b = (int)(b) - (int)(target_b); if (diff_r * diff_r + diff_g * diff_g + diff_b * diff_b > tolerance * tolerance) { @@ -66,4 +66,3 @@ uint64_t hash_pixels(const std::vector<uint8_t>& pixels) { } return hash; } - |
