summaryrefslogtreecommitdiff
path: root/src/core/CSS.hpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-17 02:29:22 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-17 02:29:22 +0100
commitf97c969d3a184dbb868eca97c850f2adaa72e3b7 (patch)
tree4fad7ef8d48434df2c03d0af20164632c2f019ed /src/core/CSS.hpp
parent0b4f9d0cb880bb1baa041c867e0a4bf191b0dfa2 (diff)
small style changed -- always pass input arguments as Handles and not Rooted -- otherwise a temporary Rooted has to be created and freed which may trigger unwanted garbage collector runs. Always use the C++ nullptr instread of NULL -- the first one is typesafe, the latter is not
Diffstat (limited to 'src/core/CSS.hpp')
-rw-r--r--src/core/CSS.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/CSS.hpp b/src/core/CSS.hpp
index 06ddfc8..cd80091 100644
--- a/src/core/CSS.hpp
+++ b/src/core/CSS.hpp
@@ -270,7 +270,7 @@ public:
: Node(mgr, std::move(name)),
pseudoSelector(std::move(pseudoSelector)),
edges(this),
- ruleSet(new RuleSet(mgr), this)
+ ruleSet(acquire(new RuleSet(mgr)))
{
}
@@ -282,7 +282,7 @@ public:
: Node(mgr, std::move(name)),
pseudoSelector("true", false),
edges(this),
- ruleSet(new RuleSet(mgr), this)
+ ruleSet(acquire(new RuleSet(mgr)))
{
}
@@ -385,13 +385,13 @@ public:
* @return A list of leafs of this SelectorTree that could not be appended,
* because they were already contained.
*/
- std::vector<Rooted<SelectorNode>> append(Rooted<SelectorEdge> edge);
+ std::vector<Rooted<SelectorNode>> append(Handle<SelectorEdge> edge);
/**
* This is just a convenience function which creates a new edge
* automatically using the DESCENDANT SelectionOperator.
*/
- std::vector<Rooted<SelectorNode>> append(Rooted<SelectorNode> node);
+ std::vector<Rooted<SelectorNode>> append(Handle<SelectorNode> node);
bool isAccepting() { return accepting; }