Browse Source

[1975] style fixes: indent; spacing; const, parentheses

JINMEI Tatuya 13 years ago
parent
commit
52a26b2169
3 changed files with 10 additions and 10 deletions
  1. 4 4
      src/lib/datasrc/list.cc
  2. 5 5
      src/lib/datasrc/list.h
  3. 1 1
      src/lib/datasrc/tests/list_unittest.cc

+ 4 - 4
src/lib/datasrc/list.cc

@@ -75,13 +75,13 @@ ConfigurableClientList::find(const dns::Name& name, bool want_exact_match,
             datasrc_client(NULL),
             datasrc_client(NULL),
             matched_labels(0)
             matched_labels(0)
         { }
         { }
-        DataSourceClient *datasrc_client;
+        DataSourceClient* datasrc_client;
         ZoneFinderPtr finder;
         ZoneFinderPtr finder;
         uint8_t matched_labels;
         uint8_t matched_labels;
-        operator FindResult() {
+        operator FindResult() const {
             // Conversion to the right result. If we return this, there was
             // Conversion to the right result. If we return this, there was
             // a partial match at best.
             // a partial match at best.
-            return FindResult(datasrc_client, finder, matched_labels, false);
+            return (FindResult(datasrc_client, finder, matched_labels, false));
         }
         }
     } candidate;
     } candidate;
 
 
@@ -112,7 +112,7 @@ ConfigurableClientList::find(const dns::Name& name, bool want_exact_match,
                         result.zone_finder->getOrigin().getLabelCount());
                         result.zone_finder->getOrigin().getLabelCount());
                     if (labels > candidate.matched_labels) {
                     if (labels > candidate.matched_labels) {
                         // This one is strictly better. Replace it.
                         // This one is strictly better. Replace it.
-                    candidate.datasrc_client = info.data_src_client_;
+                        candidate.datasrc_client = info.data_src_client_;
                         candidate.finder = result.zone_finder;
                         candidate.finder = result.zone_finder;
                         candidate.matched_labels = labels;
                         candidate.matched_labels = labels;
                     }
                     }

+ 5 - 5
src/lib/datasrc/list.h

@@ -90,9 +90,9 @@ public:
         /// too.
         /// too.
         bool operator ==(const FindResult& other) const {
         bool operator ==(const FindResult& other) const {
         return (dsrc_client_ == other.dsrc_client_ &&
         return (dsrc_client_ == other.dsrc_client_ &&
-                    finder_ == other.finder_ &&
-                    matched_labels_ == other.matched_labels_ &&
-                    exact_match_ == other.exact_match_);
+                finder_ == other.finder_ &&
+                matched_labels_ == other.matched_labels_ &&
+                exact_match_ == other.exact_match_);
         }
         }
 
 
         /// \brief The found data source client.
         /// \brief The found data source client.
@@ -224,8 +224,8 @@ public:
 
 
     /// \brief Implementation of the ClientList::find.
     /// \brief Implementation of the ClientList::find.
     virtual FindResult find(const dns::Name& zone,
     virtual FindResult find(const dns::Name& zone,
-                              bool want_exact_match = false,
-                              bool want_finder = true) const;
+                            bool want_exact_match = false,
+                            bool want_finder = true) const;
 
 
     /// \brief This holds one data source client and corresponding information.
     /// \brief This holds one data source client and corresponding information.
     ///
     ///

+ 1 - 1
src/lib/datasrc/tests/list_unittest.cc

@@ -159,7 +159,7 @@ const char* ds_zones[][3] = {
     }
     }
 };
 };
 
 
-const size_t ds_count = (sizeof (ds_zones) / sizeof (*ds_zones));
+const size_t ds_count = (sizeof(ds_zones) / sizeof(*ds_zones));
 
 
 class ListTest : public ::testing::Test {
 class ListTest : public ::testing::Test {
 public:
 public: