diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-08-01 11:29:16 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-08-01 11:29:16 +0200 |
commit | 995aa163234be3cb40c81b307bc4f47b990a35e3 (patch) | |
tree | 658f8b707641b23837c10c7145ba41205377f3e6 /include/mbgl/util | |
parent | 54ca0c357bf522cb01fa3ee2f1131aac9b9c0cc0 (diff) | |
download | qtlocation-mapboxgl-upstream/make-stale-resources-renderable.tar.gz |
Diffstat (limited to 'include/mbgl/util')
-rw-r--r-- | include/mbgl/util/enum.hpp | 3 | ||||
-rw-r--r-- | include/mbgl/util/event.hpp | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/mbgl/util/enum.hpp b/include/mbgl/util/enum.hpp index 369ca86bfd..60d8e7ca69 100644 --- a/include/mbgl/util/enum.hpp +++ b/include/mbgl/util/enum.hpp @@ -3,7 +3,6 @@ #include <mbgl/util/optional.hpp> #include <algorithm> -#include <cassert> #include <string> namespace mbgl { @@ -23,7 +22,7 @@ template <> const char * Enum<T>::toString(T t) { \ auto it = std::find_if(std::begin(T##_names), std::end(T##_names), \ [&] (const auto& v) { return t == v.first; }); \ - assert(it != std::end(T##_names)); return it->second; \ + return it == std::end(T##_names) ? "<invalid>" : it->second; \ } \ \ template <> \ diff --git a/include/mbgl/util/event.hpp b/include/mbgl/util/event.hpp index 5fe0baae3c..239b08aa90 100644 --- a/include/mbgl/util/event.hpp +++ b/include/mbgl/util/event.hpp @@ -28,6 +28,7 @@ enum class Event : uint8_t { Android, Crash, Glyph, + Resource, }; struct EventPermutation { |