summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-22 10:45:42 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-10-22 11:00:34 +0200
commit2f3952b30541d5bbb3579c39a36052c02b47b37a (patch)
treec6376f8ec6e386f29578b39c4da5a5c822086153 /include
parentb9d422ebc3d48ff91e8f2eda071a0596ada36233 (diff)
downloadqtlocation-mapboxgl-2f3952b30541d5bbb3579c39a36052c02b47b37a.tar.gz
fix compile warnings
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/platform/event.hpp6
-rw-r--r--include/mbgl/platform/log.hpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/include/mbgl/platform/event.hpp b/include/mbgl/platform/event.hpp
index d2a06618a3..0405cddfad 100644
--- a/include/mbgl/platform/event.hpp
+++ b/include/mbgl/platform/event.hpp
@@ -57,11 +57,13 @@ struct EventPermutation {
}
};
-constexpr EventSeverity disabledEventSeverities[] = {
#if !DEBUG
+constexpr EventSeverity disabledEventSeverities[] = {
EventSeverity::Debug,
-#endif
};
+#else
+constexpr EventSeverity *disabledEventSeverities = nullptr;
+#endif
constexpr Event disabledEvents[] = {
diff --git a/include/mbgl/platform/log.hpp b/include/mbgl/platform/log.hpp
index dc000b4d52..bcb6d79224 100644
--- a/include/mbgl/platform/log.hpp
+++ b/include/mbgl/platform/log.hpp
@@ -21,7 +21,7 @@ class Log {
private:
template <typename T>
constexpr static bool includes(const T e, T const *l, const size_t i = 0) {
- return i >= sizeof l ? false : *(l + i) == e ? true : includes(e, l, i + 1);
+ return l == nullptr ? false : i >= sizeof l ? false : *(l + i) == e ? true : includes(e, l, i + 1);
}
public: