From: Michal 'vorner' Vaner Date: Tue, 2 Oct 2012 18:22:23 +0000 (+0200) Subject: [2292] Parametrize constness of the chain X-Git-Tag: trac2351_base~1^2~9^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4babe763de5b20437e32829024f25a1b902df82f;p=thirdparty%2Fkea.git [2292] Parametrize constness of the chain --- diff --git a/src/lib/datasrc/memory/domaintree.h b/src/lib/datasrc/memory/domaintree.h index 20f46936e7..4f1d94aca7 100644 --- a/src/lib/datasrc/memory/domaintree.h +++ b/src/lib/datasrc/memory/domaintree.h @@ -684,7 +684,7 @@ DomainTreeNode::predecessor() const { /// DomainTree. /// This is the reason why manipulation methods such as \c push() and \c pop() /// are private (and not shown in the doxygen document). -template +template > class DomainTreeNodeChain { /// DomainTreeNodeChain is initialized by DomainTree, only DomainTree has /// knowledge to manipulate it. @@ -817,7 +817,7 @@ private: /// root node of DomainTree /// /// \exception None - const DomainTreeNode* top() const { + NodeType* top() const { assert(!isEmpty()); return (nodes_[level_count_ - 1]); } @@ -840,7 +840,7 @@ private: /// otherwise the node should be the root node of DomainTree. /// /// \exception None - void push(const DomainTreeNode* node) { + void push(NodeType* node) { assert(level_count_ < RBT_MAX_LEVEL); nodes_[level_count_++] = node; } @@ -852,7 +852,7 @@ private: const static int RBT_MAX_LEVEL = isc::dns::Name::MAX_LABELS; size_t level_count_; - const DomainTreeNode* nodes_[RBT_MAX_LEVEL]; + NodeType* nodes_[RBT_MAX_LEVEL]; const DomainTreeNode* last_compared_; isc::dns::NameComparisonResult last_comparison_; };