Permalink
Browse files

Avoiding extra conditions

  • Loading branch information...
DmitryTsepelev committed Jan 31, 2013
1 parent d6f5c46 commit 6cbfdd3de0a522c8a3f3d51af9b64cbf01da1e69
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 6cbfdd3

Please sign in to comment.