diff --git a/AppKit/CPLevelIndicator.j b/AppKit/CPLevelIndicator.j index 911dea311..e4a5474d1 100644 --- a/AppKit/CPLevelIndicator.j +++ b/AppKit/CPLevelIndicator.j @@ -253,7 +253,7 @@ var _CPLevelIndicatorBezelColor = nil, var location = [self convertPoint:[anEvent locationInWindow] fromView:nil], bounds = [self bounds], - oldValue = [self doubleValue]; + oldValue = [self doubleValue], newValue = oldValue; // Moving the mouse outside of the widget to the left sets it diff --git a/AppKit/CPRuleEditor/CPPredicateEditorRowTemplate.j b/AppKit/CPRuleEditor/CPPredicateEditorRowTemplate.j index 102747a46..0843f8ea1 100644 --- a/AppKit/CPRuleEditor/CPPredicateEditorRowTemplate.j +++ b/AppKit/CPRuleEditor/CPPredicateEditorRowTemplate.j @@ -185,7 +185,8 @@ CPTransformableAttributeType = 1800; if (![[self operators] containsObject:[predicate predicateOperatorType]]) return 0; - if (!_rightIsWildcard && ![[self rightExpressions] containsObject:[predicate rightExpression]]) return 0; + if (!_rightIsWildcard && ![[self rightExpressions] containsObject:[predicate rightExpression]]) + return 0; return 1; } diff --git a/AppKit/CPWindow/_CPDocModalWindowView.j b/AppKit/CPWindow/_CPDocModalWindowView.j index ae691300d..8bd6540d4 100644 --- a/AppKit/CPWindow/_CPDocModalWindowView.j +++ b/AppKit/CPWindow/_CPDocModalWindowView.j @@ -24,7 +24,7 @@ var _CPStandardWindowViewBodyBackgroundColor = nil; if (self) { var theClass = [self class], - bounds = [self bounds]; + bounds = [self bounds]; _bodyView = [[CPView alloc] initWithFrame:_CGRectMake(0.0, 0.0, _CGRectGetWidth(bounds), _CGRectGetHeight(bounds))]; @@ -54,4 +54,4 @@ var _CPStandardWindowViewBodyBackgroundColor = nil; return aContentRect; } -@end \ No newline at end of file +@end diff --git a/AppKit/Themes/Default/AppController.j b/AppKit/Themes/Default/AppController.j index 8a421e4c3..8ccddb630 100644 --- a/AppKit/Themes/Default/AppController.j +++ b/AppKit/Themes/Default/AppController.j @@ -31,9 +31,8 @@ [_CPCibCustomResource imageResourceWithName:"horizontal-track-center.png" size:CPSizeMake(1.0, 4.0)], [_CPCibCustomResource imageResourceWithName:"horizontal-track-right.png" size:CPSizeMake(2.0, 4.0)] ] - isVertical:NO]]; - - var horizontalSlider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 24.0)]; + isVertical:NO]], + horizontalSlider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 24.0)]; [horizontalSlider setTrackWidth:4.0]; [horizontalSlider setHorizontalTrackColor:horizontalTrackColor]; @@ -55,9 +54,8 @@ [_CPCibCustomResource imageResourceWithName:"vertical-track-center.png" size:CPSizeMake(4.0, 1.0)], [_CPCibCustomResource imageResourceWithName:"vertical-track-bottom.png" size:CPSizeMake(4.0, 2.0)] ] - isVertical:YES]]; - - var verticalSlider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 24.0, 50.0)]; + isVertical:YES]], + verticalSlider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 24.0, 50.0)]; [verticalSlider setTrackWidth:4]; [verticalSlider setVerticalTrackColor:verticalTrackColor]; diff --git a/Foundation/CPDate.j b/Foundation/CPDate.j index e666ceb15..d65b4226a 100644 --- a/Foundation/CPDate.j +++ b/Foundation/CPDate.j @@ -245,7 +245,7 @@ Date.parseISO8601 = function (date) if (isNaN(timestamp) && (struct = /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(date))) { - // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC + // avoid NaN timestamps caused by "undefined" values being passed to Date.UTC for (var i = 0, k; (k = numericKeys[i]); ++i) struct[k] = +struct[k] || 0; diff --git a/Foundation/CPDecimal.j b/Foundation/CPDecimal.j index c8b52f739..ec06deea7 100644 --- a/Foundation/CPDecimal.j +++ b/Foundation/CPDecimal.j @@ -181,7 +181,7 @@ function CPDecimalMakeWithParts(mantissa, exponent) var m = [], isNegative = NO; - if (mantissa < 0 ) + if (mantissa < 0) { isNegative = YES; mantissa = ABS(mantissa); @@ -1400,10 +1400,9 @@ function CPDecimalRound(result, dcm, scale ,roundingMode) function CPDecimalCompact(dcm) { // if positive or zero exp leading zeros simply delete, trailing ones u need to increment exponent - if (!dcm || dcm._mantissa.length == 0 || CPDecimalIsNotANumber(dcm) ) + if (!dcm || dcm._mantissa.length == 0 || CPDecimalIsNotANumber(dcm)) return; - if (CPDecimalIsZero(dcm)) { // handle zero number compacting diff --git a/Foundation/CPNumber.j b/Foundation/CPNumber.j index 870740614..48a393100 100644 --- a/Foundation/CPNumber.j +++ b/Foundation/CPNumber.j @@ -222,7 +222,8 @@ FIXME: Do we need this? - (CPString)descriptionWithLocale:(CPDictionary)aDictionary { - if (!aDictionary) return toString(); + if (!aDictionary) + return toString(); throw new Error("descriptionWithLocale: NOT YET IMPLEMENTED"); } @@ -234,37 +235,43 @@ FIXME: Do we need this? - (double)doubleValue { - if (typeof self == "boolean") return self ? 1 : 0; + if (typeof self == "boolean") + return self ? 1 : 0; return self; } - (float)floatValue { - if (typeof self == "boolean") return self ? 1 : 0; + if (typeof self == "boolean") + return self ? 1 : 0; return self; } - (int)intValue { - if (typeof self == "boolean") return self ? 1 : 0; + if (typeof self == "boolean") + return self ? 1 : 0; return self; } - (long long)longLongValue { - if (typeof self == "boolean") return self ? 1 : 0; + if (typeof self == "boolean") + return self ? 1 : 0; return self; } - (long)longValue { - if (typeof self == "boolean") return self ? 1 : 0; + if (typeof self == "boolean") + return self ? 1 : 0; return self; } - (short)shortValue { - if (typeof self == "boolean") return self ? 1 : 0; + if (typeof self == "boolean") + return self ? 1 : 0; return self; } @@ -280,7 +287,8 @@ FIXME: Do we need this? - (unsigned int)unsignedIntValue { - if (typeof self == "boolean") return self ? 1 : 0; + if (typeof self == "boolean") + return self ? 1 : 0; return self; } /* @@ -292,20 +300,24 @@ FIXME: Do we need this? */ - (unsigned long)unsignedLongValue { - if (typeof self == "boolean") return self ? 1 : 0; + if (typeof self == "boolean") + return self ? 1 : 0; return self; } - (unsigned short)unsignedShortValue { - if (typeof self == "boolean") return self ? 1 : 0; + if (typeof self == "boolean") + return self ? 1 : 0; return self; } - (CPComparisonResult)compare:(CPNumber)aNumber { - if (self > aNumber) return CPOrderedDescending; - else if (self < aNumber) return CPOrderedAscending; + if (self > aNumber) + return CPOrderedDescending; + else if (self < aNumber) return + CPOrderedAscending; return CPOrderedSame; } diff --git a/Foundation/CPScanner.j b/Foundation/CPScanner.j index cd362ad5a..ea2ffb3dc 100644 --- a/Foundation/CPScanner.j +++ b/Foundation/CPScanner.j @@ -292,7 +292,7 @@ loc += (""+f).length; var i = 0; - while (!isNaN(parseFloat(str.substring(loc+i, str.length)))) + while (!isNaN(parseFloat(str.substring(loc + i, str.length)))) {i++;} [self setScanLocation:loc + i];