Remove ignored argument _

This commit is contained in:
cacaodev
2016-02-06 20:39:49 +01:00
parent d07d8f6857
commit 65dee154f7
14 changed files with 18 additions and 20 deletions
+2 -4
View File
@@ -1142,11 +1142,9 @@ var CPComboBoxTextSubview = @"text",
// Directly nuke _items, [_items removeAll] will trigger an extra call to setContent
_items = [];
var values = [];
[anArray enumerateObjectsUsingBlock:function(object)
var values = [anArray arrayByApplyingBlock:function(object)
{
values.push([object description]);
return [object description];
}];
[self addItemsWithObjectValues:values];
+1 -1
View File
@@ -71,7 +71,7 @@ CPGradientDrawsAfterEndingLocation = kCGGradientDrawsAfterEndLocation;
if (self = [super init])
{
var colorSpace = [aColorSpace CGColorSpace] || CGColorSpaceCreateDeviceRGB,
cgColors = [someColors arrayByApplyingBlock:function(color, _)
cgColors = [someColors arrayByApplyingBlock:function(color)
{
return CGColorCreate(colorSpace, [color components])
}];
+1 -1
View File
@@ -43,7 +43,7 @@ function CPDrawTiledRects(
if (sides.length != grays.length)
[CPException raise:CPInvalidArgumentException reason:@"sides (length: " + sides.length + ") and grays (length: " + grays.length + ") must have the same length."];
var colors = [grays arrayByApplyingBlock:function(gray, _)
var colors = [grays arrayByApplyingBlock:function(gray)
{
return [CPColor colorWithCalibratedWhite:gray alpha:1.0];
}];
+1 -1
View File
@@ -361,7 +361,7 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
*/
- (CPArray)itemTitles
{
return [[self itemArray] arrayByApplyingBlock:function(item, _)
return [[self itemArray] arrayByApplyingBlock:function(item)
{
return [item title];
}];
+1 -1
View File
@@ -64,7 +64,7 @@
*/
- (CPArray)themeNames
{
return [_themes arrayByApplyingBlock:function(theme, _)
return [_themes arrayByApplyingBlock:function(theme)
{
return theme.substring(0, theme.indexOf(".keyedtheme"));
}];
+1 -1
View File
@@ -459,7 +459,7 @@ var CPToolbarsByIdentifier = nil,
/* @ignore */
- (id)_itemsWithIdentifiers:(CPArray)identifiers
{
return [identifiers arrayByApplyingBlock:function(identifier, _)
return [identifiers arrayByApplyingBlock:function(identifier)
{
return [self _itemForItemIdentifier:identifier willBeInsertedIntoToolbar:NO];
}];
+1 -1
View File
@@ -1859,7 +1859,7 @@ function CPWindowList()
{
var windowObjectList = CPWindowObjectList();
return [windowObjectList arrayByApplyingBlock:function(windowObject, _)
return [windowObjectList arrayByApplyingBlock:function(windowObject)
{
return [windowObject windowNumber];
}];
+1 -1
View File
@@ -763,7 +763,7 @@
- (void)setAttributedString:(CPAttributedString)aString
{
_string = aString._string;
_rangeEntries = [aString._rangeEntries arrayByApplyingBlock:function(entry, _)
_rangeEntries = [aString._rangeEntries arrayByApplyingBlock:function(entry)
{
return copyRangeEntry(entry);
}];
+1 -1
View File
@@ -214,7 +214,7 @@ var CPBundlesForURLStrings = { };
{
var staticResources = _bundle.staticResources();
return [staticResources arrayByApplyingBlock:function(resource, _)
return [staticResources arrayByApplyingBlock:function(resource)
{
return resource.URL();
}];
+1 -1
View File
@@ -1021,7 +1021,7 @@ var CPIndexSetCountKey = @"CPIndexSetCountKey",
var rangeStrings = [aCoder decodeObjectForKey:CPIndexSetRangeStringsKey];
_ranges = [rangeStrings arrayByApplyingBlock:function(range, _)
_ranges = [rangeStrings arrayByApplyingBlock:function(range)
{
return CPRangeFromString(range);
}];
+1 -1
View File
@@ -380,7 +380,7 @@ var _CPKeyedArchiverStringClass = Nil,
/* @ignore */
- (void)_encodeArrayOfObjects:(CPArray)objects forKey:(CPString)aKey
{
var references = [objects arrayByApplyingBlock:function(object, _)
var references = [objects arrayByApplyingBlock:function(object)
{
return _CPKeyedArchiverEncodeObject(self, object, NO);
}];
@@ -51,7 +51,7 @@
- (id)expressionValueWithObject:(id)object context:(CPDictionary)context
{
return [_aggregate arrayByApplyingBlock:function(exp, _)
return [_aggregate arrayByApplyingBlock:function(exp)
{
return [exp expressionValueWithObject:object context:context];
}];
@@ -59,7 +59,7 @@
- (CPString)description
{
var descriptions = [_aggregate arrayByApplyingBlock:function(exp, _)
var descriptions = [_aggregate arrayByApplyingBlock:function(exp)
{
return [exp description];
}];
@@ -69,7 +69,7 @@
- (CPExpression)_expressionWithSubstitutionVariables:(CPDictionary)variables
{
var subst_array = [_aggregate arrayByApplyingBlock:function(exp, _)
var subst_array = [_aggregate arrayByApplyingBlock:function(exp)
{
return [exp _expressionWithSubstitutionVariables:variables];
}];
+2 -2
View File
@@ -53,7 +53,7 @@
- (id)expressionValueWithObject:(id)object context:(CPDictionary)context
{
var args = [_arguments arrayByApplyingBlock:function(exp, _)
var args = [_arguments arrayByApplyingBlock:function(exp)
{
return [exp expressionValueWithObject:object context:context];
}];
@@ -63,7 +63,7 @@
- (CPExpression)_expressionWithSubstitutionVariables:(CPDictionary)bindings
{
var args = [_arguments arrayByApplyingBlock:function(exp, _)
var args = [_arguments arrayByApplyingBlock:function(exp)
{
return [exp _expressionWithSubstitutionVariables:bindings];
}];
@@ -133,7 +133,7 @@
- (CPExpression)_expressionWithSubstitutionVariables:(CPDictionary)variables
{
var operand = [[self operand] _expressionWithSubstitutionVariables:variables],
args = [_arguments arrayByApplyingBlock:function(arg, _)
args = [_arguments arrayByApplyingBlock:function(arg)
{
return [arg _expressionWithSubstitutionVariables:variables];
}];