Performance optimization: when processing for reactions to a card click, instead of looping through all the stored objects a second time, only call reactToClick() on objects that already indicated true to isReactingToClick().
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#include "SimpleMenu.h"
|
||||
#include "MTGAbility.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
class GuiLayer;
|
||||
class Targetable;
|
||||
class WEvent;
|
||||
@@ -49,6 +51,7 @@ public:
|
||||
protected:
|
||||
ActionElement * currentWaitingAction;
|
||||
int cantCancel;
|
||||
std::set<ActionElement*> mReactions;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user