aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Stephen <truestyle2005@163.com>2019-07-23 10:26:43 +0800
committerM.Stephen <truestyle2005@163.com>2019-07-23 10:26:43 +0800
commit60b8829004511e1e5bf0c144502937c576fd028d (patch)
tree0ecc42a140526891609d6f21f6bac9a4e9d195c4
parentcdb993594de0c01efb2ec4edf5d2a45c35c2f445 (diff)
[ios, macos]Fix nits.
-rw-r--r--platform/darwin/src/MGLLoggingConfiguration.h2
-rw-r--r--platform/darwin/src/MGLLoggingConfiguration.mm15
2 files changed, 2 insertions, 15 deletions
diff --git a/platform/darwin/src/MGLLoggingConfiguration.h b/platform/darwin/src/MGLLoggingConfiguration.h
index 9307fb5be..244507858 100644
--- a/platform/darwin/src/MGLLoggingConfiguration.h
+++ b/platform/darwin/src/MGLLoggingConfiguration.h
@@ -45,7 +45,7 @@ typedef NS_ENUM(NSInteger, MGLLoggingLevel) {
MGLLoggingLevelDebug,
#endif
/**
- Verbose-level will print all meassages.
+ Verbose-level will print all messages.
*/
MGLLoggingLevelVerbose,
};
diff --git a/platform/darwin/src/MGLLoggingConfiguration.mm b/platform/darwin/src/MGLLoggingConfiguration.mm
index 8a9878bbe..75d243936 100644
--- a/platform/darwin/src/MGLLoggingConfiguration.mm
+++ b/platform/darwin/src/MGLLoggingConfiguration.mm
@@ -52,8 +52,7 @@ public:
- (id)init{
if(self = [super init]){
- _coreLoggingObserver = std::make_unique<mbgl::MGLCoreLoggingObserver>();
- mbgl::Log::setObserver(std::move(_coreLoggingObserver));
+ mbgl::Log::setObserver(std::make_unique<mbgl::MGLCoreLoggingObserver>());
}
return self;
}
@@ -67,18 +66,6 @@ public:
}
}
-- (void)setLoggingLevel:(MGLLoggingLevel)loggingLevel {
- if(loggingLevel > MGLLoggingLevelVerbose) {
- _loggingLevel = MGLLoggingLevelVerbose;
- }
- else if (loggingLevel < MGLLoggingLevelNone) {
- _loggingLevel = MGLLoggingLevelNone;
- }
- else {
- _loggingLevel = loggingLevel;
- }
-}
-
- (void)logCallingFunction:(const char *)callingFunction functionLine:(NSUInteger)functionLine messageType:(MGLLoggingLevel)type format:(id)messageFormat, ... {
va_list formatList;
va_start(formatList, messageFormat);