From 9cb43bf8e7ffad03c360eb2b546c2ccae4db426a Mon Sep 17 00:00:00 2001 From: Jiri Drbalek Date: Thu, 2 Jul 2015 15:10:27 +0000 Subject: [PATCH] benchmark: remove duplicate code --- benchmark/compare_images.hpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/benchmark/compare_images.hpp b/benchmark/compare_images.hpp index 8fc6b1986..fb0e4ac95 100644 --- a/benchmark/compare_images.hpp +++ b/benchmark/compare_images.hpp @@ -29,19 +29,7 @@ namespace benchmark { image_rgba8 const& dest = util::get(desc_any); image_rgba8 const& src = util::get(src_any); - unsigned int width = src.width(); - unsigned int height = src.height(); - if ((width != dest.width()) || height != dest.height()) return false; - for (unsigned int y = 0; y < height; ++y) - { - const unsigned int* row_from = src.get_row(y); - const unsigned int* row_to = dest.get_row(y); - for (unsigned int x = 0; x < width; ++x) - { - if (row_from[x] != row_to[x]) return false; - } - } - return true; + return compare(dest, src, 0, true) == 0; } }