Chromium Code Reviews| Index: client/samples/total/src/Functions.dart |
| diff --git a/client/samples/total/src/Functions.dart b/client/samples/total/src/Functions.dart |
| index 2abfe68d2af632ef2870c9ce0b0a329b08a43aba..6f4e765b24cdc039065ab3b9a6c4a58cd4b7ff88 100644 |
| --- a/client/samples/total/src/Functions.dart |
| +++ b/client/samples/total/src/Functions.dart |
| @@ -595,26 +595,26 @@ class Functions { |
| } |
| stack[top] = new StringValue(sb.toString()); |
| }); |
| - _newFunc("COUNT", -1, void _(CellLocation location, List<Value> stack, int top, int nargs) { |
| + _newFunc("COUNT", -1, (CellLocation location, List<Value> stack, int top, int nargs) { |
|
zundel
2011/12/19 16:29:14
I would leave these statments unchanged. They are
scheglov
2011/12/19 19:10:38
I've restored types, but I have to tweak function
|
| int count = 0; |
| for (int i = 0; i < nargs; i++) { |
| Value value = stack[top + i]; |
| if (value.datatype == Value.TYPE_CELLREF || value.datatype == Value.TYPE_RANGE) { |
| count += _countCellsInRange(value.asRangeToken().getCellRange(location), |
| - int _(Cell cell) { return cell.isNumeric() ? 1 : 0; }); |
| + (Cell cell) { return cell.isNumeric() ? 1 : 0; }); |
| } else if (value.datatype == Value.TYPE_DOUBLE) { |
| count++; |
| } |
| } |
| stack[top] = new DoubleValue(count.toDouble()); |
| }); |
| - _newFunc("COUNTA", -1, void _(CellLocation location, List<Value> stack, int top, int nargs) { |
| + _newFunc("COUNTA", -1, (CellLocation location, List<Value> stack, int top, int nargs) { |
| int count = 0; |
| for (int i = 0; i < nargs; i++) { |
| Value value = stack[top + i]; |
| if (value.datatype == Value.TYPE_CELLREF || value.datatype == Value.TYPE_RANGE) { |
| count += _countCellsInRange(value.asRangeToken().getCellRange(location), |
| - int _(Cell cell) { return cell.isEmpty() ? 0 : 1; }); |
| + (Cell cell) { return cell.isEmpty() ? 0 : 1; }); |
| } else { |
| count++; |
| } |
| @@ -714,7 +714,7 @@ class Functions { |
| stack[top] = new DoubleValue(sum); |
| }); |
| - _newFunc("MATCH", -2, void _(CellLocation location, List<Value> stack, int top, int nargs) { |
| + _newFunc("MATCH", -2, (CellLocation location, List<Value> stack, int top, int nargs) { |
| double value = stack[top].asDouble(location); |
| RangeToken rt = stack[top + 1].asRangeToken(); |
| CellRange range = rt.getCellRange(location); |
| @@ -732,7 +732,7 @@ class Functions { |
| int index = 1; |
| double bestValue = matchType == 1 ? -1.0e100 : 1.0e100; |
| int bestIndex = -1; |
| - range.forEach(_(CellLocation loc) { |
| + range.forEach((CellLocation loc) { |
| Cell cell = loc.getCell(); |
| if (cell != null) { |
| double d = cell.getDoubleValue(); |