[svn] commit: r1735 - in /trunk/src/lib/dns: name.cc name.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Apr 19 19:00:53 UTC 2010
Author: jinmei
Date: Mon Apr 19 19:00:53 2010
New Revision: 1735
Log:
minor style fixes: position of braces.
skipping review. build/test okay.
Modified:
trunk/src/lib/dns/name.cc
trunk/src/lib/dns/name.h
Modified: trunk/src/lib/dns/name.cc
==============================================================================
--- trunk/src/lib/dns/name.cc (original)
+++ trunk/src/lib/dns/name.cc Mon Apr 19 19:00:53 2010
@@ -126,8 +126,7 @@
} 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 @@
}
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 @@
}
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 @@
}
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 @@
}
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
-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
-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&
-Name::downcase()
-{
+Name::downcase() {
unsigned int nlen = length_;
unsigned int labels = labelcount_;
unsigned int pos = 0;
@@ -746,8 +731,7 @@
}
std::ostream&
-operator<<(std::ostream& os, const Name& name)
-{
+operator<<(std::ostream& os, const Name& name) {
os << name.toText();
return (os);
}
Modified: trunk/src/lib/dns/name.h
==============================================================================
--- trunk/src/lib/dns/name.h (original)
+++ trunk/src/lib/dns/name.h Mon Apr 19 19:00:53 2010
@@ -605,8 +605,7 @@
};
inline const Name&
-Name::ROOT_NAME()
-{
+Name::ROOT_NAME() {
static Name root_name(".");
return (root_name);
}
More information about the bind10-changes
mailing list