Aaronius/robotlegs-utilities-Macrobot — Issue #1: Redunant code in AsyncCommand
Author: fljot
Created: 2011-12-22 23:13:31+00:00
State: open

https://github.com/Aaronius/robotlegs-utilities-Macrobot/blob/master/src/org/robotlegs/utilities/macrobot/AsyncCommand.as

override public function execute():void
{
complete = false; // undo/redo compatibility
super.execute();

// Maintain a reference to this command while it executes so it doesn't get
// garbage collected.
if (!complete)
{
commandMap.detain(this);
}
}

What's the point in checking if (!complete) ? complete will always be false with this code.