Skip to content

Commit

Permalink
Update to eliminate compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
lksoft committed Jul 29, 2014
1 parent a20fc8e commit e13c7b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions MGTemplateEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ - (NSString *)processTemplate:(NSString *)templateString withVariables:(NSDictio
[_globals setObject:[NSNumber numberWithBool:NO] forKey:@"no"];
_outputDisabledCount = 0;
_templateContents = templateString;
_templateLength = (NSInteger)[templateString length];
_templateLength = (int)[templateString length];
_templateVariables = [variables deepMutableCopy];
_remainingRange = NSMakeRange(0, [templateString length]);
_literal = NO;
Expand Down Expand Up @@ -604,8 +604,8 @@ - (NSString *)processTemplate:(NSString *)templateString withVariables:(NSDictio
// Check to see if there are open blocks left over.
NSUInteger openBlocks = [_openBlocksStack count];
if (openBlocks > 0) {
NSString *errMsg = [NSString stringWithFormat:@"Finished processing template, but %d %@ left open (%@).",
openBlocks,
NSString *errMsg = [NSString stringWithFormat:@"Finished processing template, but %lu %@ left open (%@).",
(unsigned long)openBlocks,
(openBlocks == 1) ? @"block was" : @"blocks were",
[[_openBlocksStack valueForKeyPath:BLOCK_NAME_KEY] componentsJoinedByString:@", "]];
[self reportError:errMsg code:6 continuing:YES];
Expand Down
2 changes: 1 addition & 1 deletion MGTemplateStandardMarkers.m
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ - (NSObject *)markerEncountered:(NSString *)marker withArguments:(NSArray *)args
// Check that endArg is a collection.
NSObject *obj = [engine resolveVariable:endArg];
if (obj && [obj respondsToSelector:@selector(objectEnumerator)] && [obj respondsToSelector:@selector(count)]) {
endIndex = (NSInteger)[(NSArray *)obj count];
endIndex = (int)[(NSArray *)obj count];
if (endIndex > 0) {
loopEnumObject = obj;
valid = YES;
Expand Down
2 changes: 1 addition & 1 deletion NSArray_DeepMutableCopy.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ @implementation NSArray (DeepMutableCopy)
- (NSMutableArray *)deepMutableCopy
{
NSMutableArray *newArray;
unsigned int index, count;
NSUInteger index, count;

count = [self count];
newArray = [[NSMutableArray alloc] initWithCapacity:count];
Expand Down

0 comments on commit e13c7b3

Please sign in to comment.