BIND 10 trac3112, updated. dd4f121644d51c4bf1b943dda702bd72482eb090 [3112] Avoid construction in some places
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Sep 17 05:24:34 UTC 2013
The branch, trac3112 has been updated
via dd4f121644d51c4bf1b943dda702bd72482eb090 (commit)
via 9b98a0122bc1cb39afc90fdece0cd63616ae4cc5 (commit)
from 384b365bc6895e251876cfbd440bee03076a87de (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dd4f121644d51c4bf1b943dda702bd72482eb090
Author: Mukund Sivaraman <muks at isc.org>
Date: Tue Sep 17 10:53:52 2013 +0530
[3112] Avoid construction in some places
commit 9b98a0122bc1cb39afc90fdece0cd63616ae4cc5
Author: Mukund Sivaraman <muks at isc.org>
Date: Tue Sep 17 10:46:13 2013 +0530
[3112] Remove the copy-constructors, favoring default ones
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/master_loader.cc | 12 ++++++++++--
src/lib/dns/rrclass-placeholder.h | 6 ------
src/lib/dns/rrttl.h | 6 ------
3 files changed, 10 insertions(+), 14 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/master_loader.cc b/src/lib/dns/master_loader.cc
index 156e044..6a34c25 100644
--- a/src/lib/dns/master_loader.cc
+++ b/src/lib/dns/master_loader.cc
@@ -324,7 +324,11 @@ private:
dynamic_cast<const rdata::generic::SOA&>(*rdata).
getMinimum();
setDefaultTTL(RRTTL(ttl_val), true);
- current_ttl_.reset(new RRTTL(*default_ttl_));
+ if (!current_ttl_) {
+ current_ttl_.reset(new RRTTL(*default_ttl_));
+ } else {
+ *current_ttl_ = *default_ttl_;
+ }
} else {
// On catching the exception we'll try to reach EOL again,
// so we need to unget it now.
@@ -333,7 +337,11 @@ private:
"no TTL specified; load rejected");
}
} else if (!explicit_ttl && default_ttl_) {
- current_ttl_.reset(new RRTTL(*default_ttl_));
+ if (!current_ttl_) {
+ current_ttl_.reset(new RRTTL(*default_ttl_));
+ } else {
+ *current_ttl_ = *default_ttl_;
+ }
} else if (!explicit_ttl && warn_rfc1035_ttl_) {
// Omitted (class and) TTL values are default to the last
// explicitly stated values (RFC 1035, Sec. 5.1).
diff --git a/src/lib/dns/rrclass-placeholder.h b/src/lib/dns/rrclass-placeholder.h
index fe83b13..b4f1851 100644
--- a/src/lib/dns/rrclass-placeholder.h
+++ b/src/lib/dns/rrclass-placeholder.h
@@ -138,12 +138,6 @@ public:
///
/// \param buffer A buffer storing the wire format data.
explicit RRClass(isc::util::InputBuffer& buffer);
- /// \brief Copy constructor.
- ///
- /// This constructor never throws an exception.
- ///
- /// \param other The RRClass to copy from.
- RRClass(const RRClass& other) : classcode_(other.classcode_) {}
/// A separate factory of RRClass from text.
///
diff --git a/src/lib/dns/rrttl.h b/src/lib/dns/rrttl.h
index 996d6d9..35403b6 100644
--- a/src/lib/dns/rrttl.h
+++ b/src/lib/dns/rrttl.h
@@ -102,12 +102,6 @@ public:
///
/// \param buffer A buffer storing the wire format data.
explicit RRTTL(isc::util::InputBuffer& buffer);
- /// \brief Copy constructor.
- ///
- /// This constructor never throws an exception.
- ///
- /// \param other The RRTTL to copy from.
- RRTTL(const RRTTL& other) : ttlval_(other.ttlval_) {}
/// A separate factory of RRTTL from text.
///
More information about the bind10-changes
mailing list