diff options
author | Abhi Beckert <abhi@Twist-of-Lemon-2.local> | 2015-05-16 08:06:06 +1000 |
---|---|---|
committer | Abhi Beckert <abhi@Twist-of-Lemon-2.local> | 2015-05-16 08:06:06 +1000 |
commit | 57a6f6c73bdaa202164645370d37fcbe5d14a092 (patch) | |
tree | dd30aa6156064f1d4c0e10ea87059625470fc2f9 /Source/MGTemplateEngine.m | |
parent | b5e972f4504043dfb9c358e272e93fb59ae2127f (diff) | |
parent | 0f0c43eb74408b6a65a42e2c6fd46f4142ef8e3f (diff) | |
download | sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.tar.gz sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.tar.bz2 sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.zip |
Merge remote-tracking branch 'sequelpro/master'
Diffstat (limited to 'Source/MGTemplateEngine.m')
-rw-r--r-- | Source/MGTemplateEngine.m | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/MGTemplateEngine.m b/Source/MGTemplateEngine.m index a6e15c2a..4fe7620b 100644 --- a/Source/MGTemplateEngine.m +++ b/Source/MGTemplateEngine.m @@ -189,10 +189,9 @@ SEL selector = @selector(templateEngine:encounteredError:isContinuing:); if ([(NSObject *)delegate respondsToSelector:selector]) { - NSError *error = [NSError errorWithDomain:TEMPLATE_ENGINE_ERROR_DOMAIN - code:code - userInfo:[NSDictionary dictionaryWithObject:errStr - forKey:NSLocalizedDescriptionKey]]; + NSError *error = [NSError errorWithDomain:TEMPLATE_ENGINE_ERROR_DOMAIN + code:code + userInfo:@{NSLocalizedDescriptionKey : errStr}]; [(NSObject <MGTemplateEngineDelegate> *)delegate templateEngine:self encounteredError:error isContinuing:continuing]; @@ -408,12 +407,12 @@ nil], GLOBAL_ENGINE_DELIMITERS, nil] forKey:GLOBAL_ENGINE_GROUP]; - [_globals setObject:[NSNumber numberWithBool:YES] forKey:@"true"]; - [_globals setObject:[NSNumber numberWithBool:NO] forKey:@"false"]; - [_globals setObject:[NSNumber numberWithBool:YES] forKey:@"YES"]; - [_globals setObject:[NSNumber numberWithBool:NO] forKey:@"NO"]; - [_globals setObject:[NSNumber numberWithBool:YES] forKey:@"yes"]; - [_globals setObject:[NSNumber numberWithBool:NO] forKey:@"no"]; + [_globals setObject:@YES forKey:@"true"]; + [_globals setObject:@NO forKey:@"false"]; + [_globals setObject:@YES forKey:@"YES"]; + [_globals setObject:@NO forKey:@"NO"]; + [_globals setObject:@YES forKey:@"yes"]; + [_globals setObject:@NO forKey:@"no"]; _outputDisabledCount = 0; [templateContents release]; templateContents = [templateString retain]; @@ -542,7 +541,7 @@ [frame setObject:endMarkers forKey:BLOCK_END_NAMES_KEY]; NSArray *arguments = [matchInfo objectForKey:MARKER_ARGUMENTS_KEY]; if (!arguments) { - arguments = [NSArray array]; + arguments = @[]; } [frame setObject:arguments forKey:BLOCK_ARGUMENTS_KEY]; [frame setObject:[matchInfo objectForKey:MARKER_RANGE_KEY] forKey:BLOCK_START_MARKER_RANGE_KEY]; |