Skip to content

Node:getChildIndex slow #49

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Call Node:getChildIndex

What is the expected output? What do you see instead?

Node:getChildIndex currently duplicate Array:indexOf functionality.

What version of the product are you using? On what operating system?

as3isolib.v1.core

Please provide any additional information below.

It's proper to replace
-            var i:int;
-            while ( i < numChildren )
-            {
-                if ( child == childrenArray[ i ])
-                    return i;
-                i++;
-            }
-            return -1;

with:

+            return childrenArray.indexOf(child);

Original issue reported on code.google.com by maxim.ga...@gmail.com on 4 Nov 2012 at 1:55

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions