Unnecessary Boolean Warning
Unnecessary Boolean Warning
- Subject: Unnecessary Boolean Warning
- From: Gordon Apple <email@hidden>
- Date: Sun, 31 Jul 2011 15:13:45 -0500
- Resent-date: Sun, 31 Jul 2011 15:37:34 -0500
- Resent-from: Gordon Apple <email@hidden>
- Resent-message-id: <CA5B21A9.4C9C8%email@hidden>
- Resent-to: Developer Mailing Lists <email@hidden>
- Thread-topic: Unnecessary Boolean Warning
Title: Unnecessary Boolean Warning
The following _expression_ generates a warning message (“&&” within “||”) and says to include the “anded” _expression_ in parens. Anybody who understands basic boolean operator precedence knows this is unnecessary. Bug report?
BOOL isInUse = [super mediaIsInUse];
isInUse = isInUse || [self videoIsOn] && ([[self capMgr] isRecording]
|| [[self camVC] movieIsPlaying]
|| [[self camVC] movieIsPaused]);
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden