Browse Source

minor style fixes: position of braces.

skipping review.  build/test okay.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1735 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 15 years ago
parent
commit
edde4be186
2 changed files with 17 additions and 34 deletions
  1. 16 32
      src/lib/dns/name.cc
  2. 1 2
      src/lib/dns/name.h

+ 16 - 32
src/lib/dns/name.cc

@@ -126,8 +126,7 @@ typedef enum {
 } ft_state;
 }
 
-Name::Name(const std::string &namestring, bool downcase)
-{
+Name::Name(const std::string &namestring, bool downcase) {
     //
     // Initialize things to make the compiler happy; they're not required.
     //
@@ -401,20 +400,17 @@ Name::Name(InputBuffer& buffer, bool downcase) {
 }
 
 void
-Name::toWire(OutputBuffer& buffer) const
-{
+Name::toWire(OutputBuffer& buffer) const {
     buffer.writeData(ndata_.data(), ndata_.size());
 }
 
 void
-Name::toWire(MessageRenderer& renderer) const
-{
+Name::toWire(MessageRenderer& renderer) const {
     renderer.writeName(*this);
 }
 
 std::string
-Name::toText(bool omit_final_dot) const
-{
+Name::toText(bool omit_final_dot) const {
     if (length_ == 1) {
         //
         // Special handling for the root label.  We ignore omit_final_dot.
@@ -493,8 +489,7 @@ Name::toText(bool omit_final_dot) const
 }
 
 NameComparisonResult
-Name::compare(const Name& other) const
-{
+Name::compare(const Name& other) const {
     // Determine the relative ordering under the DNSSEC order relation of
     // 'this' and 'other', and also determine the hierarchical relationship
     // of the names.
@@ -553,8 +548,7 @@ Name::compare(const Name& other) const
 }
 
 bool
-Name::equals(const Name& other) const
-{
+Name::equals(const Name& other) const {
     if (length_ != other.length_ || labelcount_ != other.labelcount_) {
         return (false);
     }
@@ -581,38 +575,32 @@ Name::equals(const Name& other) const
 }
 
 bool
-Name::leq(const Name& other) const
-{
+Name::leq(const Name& other) const {
     return (compare(other).getOrder() <= 0);
 }
 
 bool
-Name::geq(const Name& other) const
-{
+Name::geq(const Name& other) const {
     return (compare(other).getOrder() >= 0);
 }
 
 bool
-Name::lthan(const Name& other) const
-{
+Name::lthan(const Name& other) const {
     return (compare(other).getOrder() < 0);
 }
 
 bool
-Name::gthan(const Name& other) const
-{
+Name::gthan(const Name& other) const {
     return (compare(other).getOrder() > 0);
 }
 
 bool
-Name::isWildcard() const
-{
+Name::isWildcard() const {
     return (length_ >= 2 && ndata_[0] == 1 && ndata_[1] == '*'); 
 }
 
 Name
-Name::concatenate(const Name& suffix) const
-{
+Name::concatenate(const Name& suffix) const {
     assert(this->length_ > 0 && suffix.length_ > 0);
     assert(this->labelcount_ > 0 && suffix.labelcount_ > 0);
 
@@ -649,8 +637,7 @@ Name::concatenate(const Name& suffix) const
 }
 
 Name
-Name::reverse() const
-{
+Name::reverse() const {
     Name retname;
     //
     // Set up offsets: The size of the string and number of labels will
@@ -679,8 +666,7 @@ Name::reverse() const
 }
 
 Name
-Name::split(unsigned int first, unsigned int n) const
-{
+Name::split(unsigned int first, unsigned int n) const {
     if (n == 0 || first + n > labelcount_) {
         isc_throw(OutOfRange, "Name::split: invalid split range");
     }
@@ -717,8 +703,7 @@ Name::split(unsigned int first, unsigned int n) const
 }
 
 Name&
-Name::downcase()
-{
+Name::downcase() {
     unsigned int nlen = length_;
     unsigned int labels = labelcount_;
     unsigned int pos = 0;
@@ -746,8 +731,7 @@ Name::downcase()
 }
 
 std::ostream&
-operator<<(std::ostream& os, const Name& name)
-{
+operator<<(std::ostream& os, const Name& name) {
     os << name.toText();
     return (os);
 }

+ 1 - 2
src/lib/dns/name.h

@@ -605,8 +605,7 @@ private:
 };
 
 inline const Name&
-Name::ROOT_NAME()
-{
+Name::ROOT_NAME() {
     static Name root_name(".");
     return (root_name);
 }