mirror of
https://github.com/nickshanks/ResKnife.git
synced 2024-11-04 22:06:17 +00:00
Fast enumeration.
This commit is contained in:
parent
e3017f5f9e
commit
4d290d4aa6
@ -50,8 +50,7 @@
|
||||
// return 0;
|
||||
|
||||
unsigned int size = 0;
|
||||
NSEnumerator *enumerator = [subElements objectEnumerator];
|
||||
while(Element *element = [enumerator nextObject])
|
||||
for (Element *element in subElements)
|
||||
size += [element sizeOnDisk];
|
||||
return size;
|
||||
}
|
||||
@ -61,8 +60,7 @@
|
||||
if([[self label] isEqualToString: [[stream key] stringValue]])
|
||||
{
|
||||
// writes out the data of all our sub-elements here:
|
||||
NSEnumerator *enumerator = [subElements objectEnumerator];
|
||||
while(Element *element = [enumerator nextObject])
|
||||
for (Element *element in subElements)
|
||||
[element writeDataTo:stream];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user