summaryrefslogtreecommitdiff
path: root/include/mbgl/platform
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-10 21:17:23 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-13 17:22:05 -0700
commit282e626ac112b1ca7a9bf9f9d4c0239db8fbd97a (patch)
treef83ef7974687a84341dd616b364b2aa5a9c012a8 /include/mbgl/platform
parent36bef2157595e1455aa55c64c6c526f096dd1c8e (diff)
downloadqtlocation-mapboxgl-282e626ac112b1ca7a9bf9f9d4c0239db8fbd97a.tar.gz
[core] Make enum ↔ string conversion more generic-friendly
Rewrite enum.hpp in such a way that parseConstant can be defined generically for all enumerated types. While there, properly validated enumerated property values.
Diffstat (limited to 'include/mbgl/platform')
-rw-r--r--include/mbgl/platform/event.hpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/include/mbgl/platform/event.hpp b/include/mbgl/platform/event.hpp
index f082114946..ee1ce6fa4e 100644
--- a/include/mbgl/platform/event.hpp
+++ b/include/mbgl/platform/event.hpp
@@ -1,7 +1,5 @@
#pragma once
-#include <mbgl/util/enum.hpp>
-
#include <cstdint>
namespace mbgl {
@@ -13,14 +11,6 @@ enum class EventSeverity : uint8_t {
Error,
};
-MBGL_DEFINE_ENUM_CLASS(EventSeverityClass, EventSeverity, {
- { EventSeverity::Debug, "DEBUG" },
- { EventSeverity::Info, "INFO" },
- { EventSeverity::Warning, "WARNING" },
- { EventSeverity::Error, "ERROR" },
- { EventSeverity(-1), "UNKNOWN" },
-})
-
enum class Event : uint8_t {
General,
Setup,
@@ -40,27 +30,6 @@ enum class Event : uint8_t {
Glyph,
};
-MBGL_DEFINE_ENUM_CLASS(EventClass, Event, {
- { Event::General, "General" },
- { Event::Setup, "Setup" },
- { Event::Shader, "Shader" },
- { Event::ParseStyle, "ParseStyle" },
- { Event::ParseTile, "ParseTile" },
- { Event::Render, "Render" },
- { Event::Style, "Style" },
- { Event::Database, "Database" },
- { Event::HttpRequest, "HttpRequest" },
- { Event::Sprite, "Sprite" },
- { Event::Image, "Image" },
- { Event::OpenGL, "OpenGL" },
- { Event::JNI, "JNI" },
- { Event::Android, "Android" },
- { Event::Crash, "Crash" },
- { Event::Glyph, "Glyph" },
- { Event(-1), "Unknown" },
-})
-
-
struct EventPermutation {
const EventSeverity severity;
const Event event;