Permalink
Browse files

Merge pull request #11 from DmitryTsepelev/cleanup

Avoiding extra conditions
  • Loading branch information...
2 parents d6f5c46 + 6cbfdd3 commit 9caa12ee5c878ac21a568e7a8a3ce153399ea34c @michaelkamprath committed Feb 2, 2013
Showing with 1 addition and 8 deletions.
  1. +1 −8 Views/MKNumberBadgeView/MKNumberBadgeView.m
@@ -273,14 +273,7 @@ - (void)setValue:(NSUInteger)inValue
{
_value = inValue;
- if (self.hideWhenZero == YES && _value == 0)
- {
- self.hidden = YES;
- }
- else
- {
- self.hidden = NO;
- }
+ self.hidden = self.hideWhenZero && _value == 0;
[self setNeedsDisplay];
}

0 comments on commit 9caa12e

Please sign in to comment.