From f97c969d3a184dbb868eca97c850f2adaa72e3b7 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Wed, 17 Dec 2014 02:29:22 +0100 Subject: 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 --- src/core/CSS.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/CSS.hpp') 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> append(Rooted edge); + std::vector> append(Handle edge); /** * This is just a convenience function which creates a new edge * automatically using the DESCENDANT SelectionOperator. */ - std::vector> append(Rooted node); + std::vector> append(Handle node); bool isAccepting() { return accepting; } -- cgit v1.2.3