Skip to content

Commit

Permalink
Use DEBUG preprocessor flag to conditionally disable assertions in pr…
Browse files Browse the repository at this point in the history
…od (#711)
  • Loading branch information
tonyxiao authored Aug 24, 2017
1 parent e483132 commit b90bd1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Analytics/Classes/Internal/SEGAnalyticsUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ static id SEGCoerceJSONObject(id obj)

static void AssertDictionaryTypes(id dict)
{
#ifdef DEBUG
assert([dict isKindOfClass:[NSDictionary class]]);
for (id key in dict) {
assert([key isKindOfClass:[NSString class]]);
Expand All @@ -159,6 +160,7 @@ static void AssertDictionaryTypes(id dict)
[value isKindOfClass:[NSDate class]] ||
[value isKindOfClass:[NSURL class]]);
}
#endif
}

NSDictionary *SEGCoerceDictionary(NSDictionary *dict)
Expand Down

0 comments on commit b90bd1c

Please sign in to comment.