Permalink
Browse files

Be careful with assignments in while().

Tell the compiler that we explicitly want to do this.
  • Loading branch information...
1 parent 4173e5a commit f1d44e50b803317c683caef805544512465e661f @0-wiz-0 0-wiz-0 committed Jun 26, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 Classes/Settings/SettingsController.m
  2. +1 −1 Classes/Utilities/DataUtils.m
@@ -171,7 +171,7 @@ - (NSArray*)entryFields {
NSMutableArray *ret = [NSMutableArray arrayWithCapacity:3];
NSInteger tag = 1;
UIView *aView;
- while (aView = [self.view viewWithTag:tag]) {
+ while ((aView = [self.view viewWithTag:tag])) {
if (aView && [[aView class] isSubclassOfClass:[UIResponder class]]) {
[ret addObject:aView];
}
@@ -340,7 +340,7 @@ void DeleteNodesWithFilename(NSString* filename) {
// Get our managedObjectContext
managedObjectContext = [AppInstance() managedObjectContext];
- while (node = NodeWithFilename(filename)) {
+ while ((node = NodeWithFilename(filename))) {
[managedObjectContext deleteObject:node];
Save();
}

0 comments on commit f1d44e5

Please sign in to comment.