diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-02-17 15:53:14 +0100 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-03-22 11:56:01 -0700 |
commit | 1dd81d9776baf9b9ef61b05d29f7acbb0f2a1508 (patch) | |
tree | ded904ed0a8b2d9cb0f3f784d683162e5917e99f /include | |
parent | c608803ca95e833c9312c0f1cd622594224d5458 (diff) | |
download | qtlocation-mapboxgl-1dd81d9776baf9b9ef61b05d29f7acbb0f2a1508.tar.gz |
[test] remove crc64 and compare images
boost's crc64 breaks on iOS
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/util/image.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp index 7927b777ea..a1c899d239 100644 --- a/include/mbgl/util/image.hpp +++ b/include/mbgl/util/image.hpp @@ -3,6 +3,7 @@ #include <string> #include <memory> +#include <algorithm> namespace mbgl { @@ -26,6 +27,12 @@ public: height(h), data(std::move(data_)) {} + bool operator==(const Image& rhs) const { + return width == rhs.width && height == rhs.height && + std::equal(data.get(), data.get() + size(), rhs.data.get(), + rhs.data.get() + rhs.size()); + } + size_t stride() const { return width * 4; } size_t size() const { return width * height * 4; } |