BIND 10 trac2208, updated. 503a7b06ae96ef13d1f1a5344e07c06786b5eb83 [2208] Constify and use references in some args

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Oct 25 00:56:46 UTC 2012


The branch, trac2208 has been updated
       via  503a7b06ae96ef13d1f1a5344e07c06786b5eb83 (commit)
      from  4ea73cff14dfd8c6898f1c79e7de860a2ca83b33 (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 503a7b06ae96ef13d1f1a5344e07c06786b5eb83
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Oct 25 06:20:59 2012 +0530

    [2208] Constify and use references in some args

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/memory/zone_table.cc         |    2 +-
 src/lib/datasrc/memory/zone_table.h          |    6 +++---
 src/lib/datasrc/memory/zone_table_segment.cc |    2 +-
 src/lib/datasrc/memory/zone_table_segment.h  |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/zone_table.cc b/src/lib/datasrc/memory/zone_table.cc
index 7fce633..c0237f5 100644
--- a/src/lib/datasrc/memory/zone_table.cc
+++ b/src/lib/datasrc/memory/zone_table.cc
@@ -47,7 +47,7 @@ typedef boost::function<void(ZoneData*)> ZoneDataDeleterType;
 }
 
 ZoneTable*
-ZoneTable::create(util::MemorySegment& mem_sgmt, RRClass zone_class) {
+ZoneTable::create(util::MemorySegment& mem_sgmt, const RRClass& zone_class) {
     SegmentObjectHolder<ZoneTableTree, ZoneDataDeleterType> holder(
         mem_sgmt, ZoneTableTree::create(mem_sgmt),
         boost::bind(deleteZoneData, &mem_sgmt, _1, zone_class));
diff --git a/src/lib/datasrc/memory/zone_table.h b/src/lib/datasrc/memory/zone_table.h
index 36febe4..0976567 100644
--- a/src/lib/datasrc/memory/zone_table.h
+++ b/src/lib/datasrc/memory/zone_table.h
@@ -102,7 +102,7 @@ private:
     /// This constructor internally involves resource allocation, and if
     /// it fails, a corresponding standard exception will be thrown.
     /// It never throws an exception otherwise.
-    ZoneTable(dns::RRClass rrclass, ZoneTableTree* zones) :
+    ZoneTable(const dns::RRClass& rrclass, ZoneTableTree* zones) :
         rrclass_(rrclass),
         zones_(zones)
     {}
@@ -121,7 +121,7 @@ public:
     /// \param zone_class The RR class of the zone.  It must be the RR class
     /// that is supposed to be associated to the zone table.
     static ZoneTable* create(util::MemorySegment& mem_sgmt,
-                             dns::RRClass zone_class);
+                             const dns::RRClass& zone_class);
 
     /// \brief Destruct and deallocate \c ZoneTable
     ///
@@ -186,7 +186,7 @@ public:
     FindResult findZone(const isc::dns::Name& name) const;
 
 private:
-    dns::RRClass rrclass_;
+    const dns::RRClass rrclass_;
     boost::interprocess::offset_ptr<ZoneTableTree> zones_;
 };
 }
diff --git a/src/lib/datasrc/memory/zone_table_segment.cc b/src/lib/datasrc/memory/zone_table_segment.cc
index 1c7028a..50587c4 100644
--- a/src/lib/datasrc/memory/zone_table_segment.cc
+++ b/src/lib/datasrc/memory/zone_table_segment.cc
@@ -22,7 +22,7 @@ namespace datasrc {
 namespace memory {
 
 ZoneTableSegment*
-ZoneTableSegment::create(const isc::data::Element&, RRClass rrclass) {
+ZoneTableSegment::create(const isc::data::Element&, const RRClass& rrclass) {
     /// FIXME: For now, we always return ZoneTableSegmentLocal. This
     /// should be updated eventually to parse the passed Element
     /// argument and construct a corresponding ZoneTableSegment
diff --git a/src/lib/datasrc/memory/zone_table_segment.h b/src/lib/datasrc/memory/zone_table_segment.h
index f4b5ded..64a3fd0 100644
--- a/src/lib/datasrc/memory/zone_table_segment.h
+++ b/src/lib/datasrc/memory/zone_table_segment.h
@@ -98,7 +98,7 @@ public:
     ///               is returned.
     /// \return Returns a ZoneTableSegment object
     static ZoneTableSegment* create(const isc::data::Element& config,
-                                    isc::dns::RRClass rrclass);
+                                    const isc::dns::RRClass& rrclass);
 
     /// \brief Destroy a ZoneTableSegment
     ///



More information about the bind10-changes mailing list