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 /platform/darwin | |
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 'platform/darwin')
-rw-r--r-- | platform/darwin/src/log_nslog.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/darwin/src/log_nslog.mm b/platform/darwin/src/log_nslog.mm index a2e31968ab..49583ae3c4 100644 --- a/platform/darwin/src/log_nslog.mm +++ b/platform/darwin/src/log_nslog.mm @@ -1,4 +1,5 @@ #include <mbgl/platform/log.hpp> +#include <mbgl/util/enum.hpp> #import <Foundation/Foundation.h> @@ -7,7 +8,7 @@ namespace mbgl { void Log::platformRecord(EventSeverity severity, const std::string &msg) { NSString *message = [[NSString alloc] initWithBytes:msg.data() length:msg.size() encoding:NSUTF8StringEncoding]; - NSLog(@"[%s] %@", EventSeverityClass(severity).c_str(), message); + NSLog(@"[%s] %@", Enum<EventSeverity>::toString(severity), message); } } |