Skip to content

Commit

Permalink
Reverted changes Zaphod does not approve of.
Browse files Browse the repository at this point in the history
  • Loading branch information
gamedevsam committed Nov 21, 2012
1 parent 6b348ba commit e353f07
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 20 deletions.
5 changes: 1 addition & 4 deletions src/addons/NestedSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ class NestedSprite extends FlxSprite
var index:Int = FlxU.ArrayIndexOf(_children, Child);
if (index >= 0)
{
if (index < _children.length - 1)
_children[index] = _children.pop();
else
_children.pop();
_children.splice(index, 1);
}

return Child;
Expand Down
5 changes: 1 addition & 4 deletions src/org/flixel/FlxGroup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,7 @@ class FlxGroup extends FlxBasic
}
if (Splice)
{
if(index < --length)
members[index] = members.pop();
else
members.pop();
members.splice(index, 1);
}
else
{
Expand Down
7 changes: 3 additions & 4 deletions src/org/flixel/plugin/TimerManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ class TimerManager extends FlxBasic
var index:Int = FlxU.ArrayIndexOf(_timers, Timer);
if (index >= 0)
{
if (index < _timers.length - 1)
_timers[index] = _timers.pop();
else
_timers.pop();
// Fast array removal (only do on arrays where order doesn't matter)
_timers[index] = _timers[_timers.length - 1];
_timers.pop();
}
}

Expand Down
7 changes: 3 additions & 4 deletions src/org/flixel/system/debug/Watch.hx
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,9 @@ class Watch extends FlxWindow
watchEntry = _watching[i];
if((watchEntry.object == AnyObject) && ((VariableName == null) || (watchEntry.field == VariableName)))
{
if (i < _watching.length - 1)
_watching[i] = _watching.pop();
else
_watching.pop();
// Fast array removal (only do on arrays where order doesn't matter)
_watching[i] = _watching[_watching.length - 1];
_watching.pop();

_names.removeChild(watchEntry.nameDisplay);
_values.removeChild(watchEntry.valueDisplay);
Expand Down
7 changes: 3 additions & 4 deletions src/org/flixel/system/layer/TileSheetData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ class TileSheetData
{
if (tileSheetData[i] == tileSheetObj)
{
if (i < tileSheetData.length - 1)
tileSheetData[i] = tileSheetData.pop();
else
tileSheetData.pop();
// Fast array removal (only do on arrays where order doesn't matter)
tileSheetData[i] = tileSheetData[tileSheetData.length - 1];
tileSheetData.pop();

tileSheetObj.destroy();
return;
Expand Down

0 comments on commit e353f07

Please sign in to comment.