Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts: platform/default/image.cpp
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include <mbgl/util/image.hpp>
|
||||
#include <mbgl/platform/log.hpp>
|
||||
#include <mbgl/util/string.hpp>
|
||||
|
||||
#include <png.h>
|
||||
|
||||
@@ -9,6 +10,19 @@
|
||||
#include <cstring>
|
||||
|
||||
|
||||
// Check png library version.
|
||||
const static bool png_version_check = []() {
|
||||
const png_uint_32 version = png_access_version_number();
|
||||
if (version != PNG_LIBPNG_VER) {
|
||||
throw std::runtime_error(mbgl::util::sprintf<96>(
|
||||
"libpng version mismatch: headers report %d.%d.%d, but library reports %d.%d.%d",
|
||||
PNG_LIBPNG_VER / 10000, (PNG_LIBPNG_VER / 100) % 100, PNG_LIBPNG_VER % 100,
|
||||
version / 10000, (version / 100) % 100, version % 100));
|
||||
}
|
||||
return true;
|
||||
}();
|
||||
|
||||
|
||||
namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user