Parcourir la source

trivial style fixes

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac397focused@3788 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya il y a 14 ans
Parent
commit
3b0699d83d
1 fichiers modifiés avec 8 ajouts et 7 suppressions
  1. 8 7
      src/lib/datasrc/rbtree.h

+ 8 - 7
src/lib/datasrc/rbtree.h

@@ -109,13 +109,13 @@ public:
     /// free the pointer
     /// free the pointer
     T* getData() { return (data_); }
     T* getData() { return (data_); }
     /// \brief return the data stored in this node, read-only version
     /// \brief return the data stored in this node, read-only version
-    const T *getData() const { return (data_);}
+    const T* getData() const { return (data_); }
 
 
     /// \brief return whether the node has related data 
     /// \brief return whether the node has related data 
     /// \note it's meaningless has empty \c RBNode in one RBTree, the only 
     /// \note it's meaningless has empty \c RBNode in one RBTree, the only 
     /// exception is for non-terminal node which has sub domain nodes who
     /// exception is for non-terminal node which has sub domain nodes who
     /// has data(rrset)
     /// has data(rrset)
-    bool isEmpty() const { return (data_ == NULL);}
+    bool isEmpty() const { return (data_ == NULL); }
     //@}
     //@}
 
 
     /// \name Modify functions
     /// \name Modify functions
@@ -459,10 +459,11 @@ RBTree<T>::findHelper(const isc::dns::Name& target_name, RBNode<T>** up_node,
                 } else {
                 } else {
                     ret = RBTree<T>::PARTIALMATCH;
                     ret = RBTree<T>::PARTIALMATCH;
                     *target = node;
                     *target = node;
-                    if (node->down_ != NULL)
+                    if (node->down_ != NULL) {
                         node = node->down_;
                         node = node->down_;
-                    else
+                    } else {
                         break;
                         break;
+                    }
                 }
                 }
             } else {
             } else {
                 break;
                 break;
@@ -510,7 +511,8 @@ RBTree<T>::insert(const isc::dns::Name& target_name, RBNode<T>** new_node) {
                 // insert sub domain to sub tree
                 // insert sub domain to sub tree
                 if (relation == isc::dns::NameComparisonResult::SUBDOMAIN) {
                 if (relation == isc::dns::NameComparisonResult::SUBDOMAIN) {
                     if (current->down_ == NULL) {
                     if (current->down_ == NULL) {
-                        std::auto_ptr<RBNode<T> > node(new RBNode<T>(name - current->name_));
+                        std::auto_ptr<RBNode<T> > node(
+                            new RBNode<T>(name - current->name_));
                         //root node of sub tree, the initial color is BLACK
                         //root node of sub tree, the initial color is BLACK
                         node->color_ = BLACK;
                         node->color_ = BLACK;
                         current->down_ = node.get();
                         current->down_ = node.get();
@@ -562,7 +564,6 @@ RBTree<T>::insert(const isc::dns::Name& target_name, RBNode<T>** new_node) {
     return (SUCCEED);
     return (SUCCEED);
 }
 }
 
 
-
 template <typename T>
 template <typename T>
 void
 void
 RBTree<T>::nodeFission(RBNode<T>& node, const isc::dns::Name& base_name) {
 RBTree<T>::nodeFission(RBNode<T>& node, const isc::dns::Name& base_name) {
@@ -694,7 +695,7 @@ RBTree<T>::dumpTreeHelper(std::ostream& os, const RBNode<T>* node,
     os << ((node->isEmpty()) ? "[invisible] \n" : "\n");
     os << ((node->isEmpty()) ? "[invisible] \n" : "\n");
     if (node->down_ != NULL) {
     if (node->down_ != NULL) {
         helper::indent(os, depth + 1);
         helper::indent(os, depth + 1);
-        os << "begin down from "<< node->name_.toText() << "\n";
+        os << "begin down from " << node->name_.toText() << "\n";
         dumpTreeHelper(os, node->down_, depth + 1);
         dumpTreeHelper(os, node->down_, depth + 1);
         helper::indent(os, depth + 1);
         helper::indent(os, depth + 1);
         os << "end down from " << node->name_.toText() << "\n";
         os << "end down from " << node->name_.toText() << "\n";