mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Remove uneeded outside iteration and get the lastIndex more efficiently, also cleanup NSLog per @fredkiefer
This commit is contained in:
parent
d8c4c14018
commit
0ab960e6fc
2 changed files with 1 additions and 10 deletions
|
@ -335,10 +335,9 @@
|
|||
if ([self canAddChild]
|
||||
&& [self countKeyPath] == nil)
|
||||
{
|
||||
NSUInteger length = [indexPath length] - 1;
|
||||
NSUInteger length = [indexPath length];
|
||||
NSUInteger pos = 0;
|
||||
NSMutableArray *children = [_arranged_objects mutableChildNodes];
|
||||
NSUInteger lastIndex = 0;
|
||||
|
||||
for (pos = 0; pos < length; pos++)
|
||||
{
|
||||
|
@ -348,11 +347,6 @@
|
|||
children = [node valueForKeyPath: _childrenKeyPath];
|
||||
}
|
||||
|
||||
lastIndex = [indexPath indexAtPosition: length];
|
||||
|
||||
id child = [children objectAtIndex: lastIndex];
|
||||
|
||||
children = [child valueForKeyPath: _childrenKeyPath];
|
||||
[children addObject: object];
|
||||
|
||||
[self rearrangeObjects];
|
||||
|
|
|
@ -154,7 +154,6 @@
|
|||
|
||||
- (NSIndexPath*) indexPath
|
||||
{
|
||||
NSLog(@"In %@", NSStringFromSelector(_cmd));
|
||||
if (_parentNode != nil)
|
||||
{
|
||||
NSIndexPath *path;
|
||||
|
@ -170,8 +169,6 @@
|
|||
{
|
||||
return [NSIndexPath indexPathWithIndex: index];
|
||||
}
|
||||
|
||||
NSLog(@"index = %ld", index);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue