mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-19 23:05:01 +00:00
CPPredicate & co style cleaning
This commit is contained in:
1 parent
30bc304a20
commit
c694c96a32
3 files changed
+9
-6
No files matched your search
@@ -104,9 +104,10 @@ var CPCompoundPredicateType;
|
||||
- (CPPredicate)predicateWithSubstitutionVariables:(CPDictionary)variables
|
||||
{
|
||||
var subp = [CPArray array],
|
||||
count = [subp count];
|
||||
i;
|
||||
|
||||
for (i = 0; i < [subp count]; i++)
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
var p = [subp objectAtIndex:i],
|
||||
sp = [p predicateWithSubstitutionVariables:variables];
|
||||
@@ -125,7 +126,7 @@ var CPCompoundPredicateType;
|
||||
i;
|
||||
|
||||
if (count == 0)
|
||||
return @"TRUPREDICATE";
|
||||
return @"TRUPREDICATE";
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
@@ -146,12 +147,14 @@ var CPCompoundPredicateType;
|
||||
break;
|
||||
case CPAndPredicateType:
|
||||
result += [args objectAtIndex:0];
|
||||
for (var j = 1; j < [args count]; j++)
|
||||
var count = [args count];
|
||||
for (var j = 1; j < count; j++)
|
||||
result += " AND " + [args objectAtIndex:j];
|
||||
break;
|
||||
case CPOrPredicateType:
|
||||
result += [args objectAtIndex:0];
|
||||
for (var j = 1; j < [args count]; j++)
|
||||
var count = [args count];
|
||||
for (var j = 1; j < count; j++)
|
||||
result += " OR " + [args objectAtIndex:j];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
count = [_aggregate count],
|
||||
result = "{";
|
||||
|
||||
for (i = 0;i < count;i++)
|
||||
for (i = 0; i < count; i++)
|
||||
result = result + [CPString stringWithFormat:@"%s%s", [[_aggregate objectAtIndex:i] description], (i + 1 < count) ? @", " : @""];
|
||||
|
||||
result = result + "}";
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
{
|
||||
var count = [self count];
|
||||
|
||||
while (--count >= 0)
|
||||
while (count--)
|
||||
{
|
||||
var object = [self objectAtIndex:count];
|
||||
|
||||
|
||||
Reference in new issue
Block a user