diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-10 21:17:23 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-13 17:22:05 -0700 |
commit | 282e626ac112b1ca7a9bf9f9d4c0239db8fbd97a (patch) | |
tree | f83ef7974687a84341dd616b364b2aa5a9c012a8 /include/mbgl/style | |
parent | 36bef2157595e1455aa55c64c6c526f096dd1c8e (diff) | |
download | qtlocation-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/style')
-rw-r--r-- | include/mbgl/style/types.hpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/include/mbgl/style/types.hpp b/include/mbgl/style/types.hpp index ece56026df..46c0cb3c39 100644 --- a/include/mbgl/style/types.hpp +++ b/include/mbgl/style/types.hpp @@ -1,6 +1,6 @@ #pragma once -#include <mbgl/util/enum.hpp> +#include <cstdint> namespace mbgl { @@ -13,14 +13,6 @@ enum class SourceType : uint8_t { Annotations }; -MBGL_DEFINE_ENUM_CLASS(SourceTypeClass, SourceType, { - { SourceType::Vector, "vector" }, - { SourceType::Raster, "raster" }, - { SourceType::GeoJSON, "geojson" }, - { SourceType::Video, "video" }, - { SourceType::Annotations, "annotations" }, -}) - namespace style { enum class VisibilityType : bool { |