1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Avoid manual index counting.

This commit is contained in:
Thomas Harte 2022-06-27 11:16:05 -04:00
parent 5cb0aebdf4
commit 823c7765f8

View File

@ -239,10 +239,8 @@ namespace {
options:0
error:nil];
int testNumber = 0;
for(NSDictionary *test in tests) {
NSLog(@"Test index %d", testNumber);
++testNumber;
[tests enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull test, NSUInteger index, BOOL * _Nonnull stop) {
NSLog(@"Test index %lu", static_cast<unsigned long>(index));
// Apply state.
const bool highRes = [test[@"hires"] boolValue];
@ -306,12 +304,13 @@ namespace {
if(physical != foundPhysical) {
NSLog(@"Stopping after first failure");
*stop = YES;
return;
}
if(physical != physicalEnd) ++physical;
}
}
}
}];
}
@end