path: root/src/privateoption.h
diff options
authorDanny Baumann <>2010-11-09 21:11:29 +0800
committerSam Spilsbury <>2010-11-09 21:13:21 +0800
commit267b9d12b6f8cc4218a761c2a7e92ca350b7f6a6 (patch)
treec51b378c2803b4edcf55e2ca507a56fb6be98e5d /src/privateoption.h
parent46db42b1107f2ff3dd641ba3b5f8d18088a08bfb (diff)
[PATCH] Be a little bit more clever when handing option construction in handleActionEvent.
Previously we would have a static CompAction::Vector which we would resize to lower sizes (so that triggerFooBindings doesn't die) but this causes us to be reconstruction CompOptions all the time which is expensive. Instead just reset the option to make it "dead" (eg keep it in memory for longer) but don't create and recreate them all the time Also copy the active state of a CompAction on copy-construct
Diffstat (limited to 'src/privateoption.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/privateoption.h b/src/privateoption.h
index 1749554..0b00fb0 100644
--- a/src/privateoption.h
+++ b/src/privateoption.h
@@ -78,6 +78,8 @@ class PrivateValue {
CompMatch match;
CompOption::Type listType;
CompOption::Value::Vector list;
+ bool active;
class PrivateOption