Permalink
Browse files

Remove static qualifier from error codes

Otherwise Xcode considers them unused variables per
-Wunused-const-variable
  • Loading branch information...
1 parent 4b7cd96 commit 24a593d02719de3c207cc39df7aae02f9a5a054f @robb robb committed Feb 1, 2014
Showing with 2 additions and 2 deletions.
  1. +1 −1 Mantle/MTLJSONAdapter.m
  2. +1 −1 Mantle/MTLManagedObjectAdapter.m
View
@@ -15,7 +15,7 @@
const NSInteger MTLJSONAdapterErrorInvalidJSONDictionary = 3;
// An exception was thrown and caught.
-static const NSInteger MTLJSONAdapterErrorExceptionThrown = 1;
@JaviSoto

JaviSoto Feb 5, 2014

This one IS used, the other one isn't (so can be removed?)

@jspahrsummers

jspahrsummers Feb 5, 2014

Owner

Depends on the build configuration.

+const NSInteger MTLJSONAdapterErrorExceptionThrown = 1;
// Associated with the NSException that was caught.
static NSString * const MTLJSONAdapterThrownExceptionErrorKey = @"MTLJSONAdapterThrownException";
@@ -35,7 +35,7 @@ static id performInContext(NSManagedObjectContext *context, id (^block)(void)) {
}
// An exception was thrown and caught.
-static const NSInteger MTLManagedObjectAdapterErrorExceptionThrown = 1;
+const NSInteger MTLManagedObjectAdapterErrorExceptionThrown = 1;
@interface MTLManagedObjectAdapter ()

2 comments on commit 24a593d

If you don't make them static, they're extern, which means they're visible outside their own file's unit.

Owner

jspahrsummers replied Feb 5, 2014

There's nothing wrong with that here. They use prefixed names, so they're not going to conflict with anything.

Please sign in to comment.