Browse Source

Code cleanups according to review

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac444@3943 e5f2f494-b856-4b98-b285-d166d9295462
Michal Vaner 14 years ago
parent
commit
b61101c797

+ 7 - 0
src/lib/datasrc/memory_datasrc.cc

@@ -42,6 +42,13 @@ struct MemoryZone::MemoryZoneImpl {
     /*
      * Each domain consists of some RRsets. They will be looked up by the
      * RRType.
+     *
+     * The use of map is questionable with regard to performance - there'll
+     * be usually only few RRsets in the domain, so the log n benefit isn't
+     * much and a vector/array might be faster due to its simplicity and
+     * continuous memory location. But this is unlikely to be a performance
+     * critical place and map has better interface for the lookups, so we use
+     * that.
      */
     typedef map<RRType, ConstRRsetPtr> Domain;
     typedef boost::shared_ptr<Domain> DomainPtr;

+ 0 - 4
src/lib/datasrc/memory_datasrc.h

@@ -26,10 +26,6 @@ namespace datasrc {
 
 /// A derived zone class intended to be used with the memory data source.
 ///
-/// Currently this is almost empty and is only used for testing the
-/// \c ZoneTable class.  It will be substantially expanded, and will probably
-/// moved to a separate header file.
-///
 /// \todo Is this really needed in header file? If it is used only inside
 /// MemoryDataSrc, we could move it to .cc file and not care about the impl_.
 class MemoryZone : public Zone {

+ 3 - 2
src/lib/datasrc/result.h

@@ -1,4 +1,5 @@
-// Copyright (C) 2010  CZ NIC, Inc. ("ISC")
+// Copyright (C) 2010  CZ NIC
+// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -29,7 +30,7 @@ enum Result {
     SUCCESS,  ///< The operation is successful.
     EXIST,    ///< The search key is already stored.
     NOTFOUND, ///< The specified object is not found.
-    PARTIALMATCH ///< \c Only a partial match is found.
+    PARTIALMATCH ///< Only a partial match is found.
 };
 
 }

+ 2 - 1
src/lib/datasrc/zone.h

@@ -1,4 +1,5 @@
-// Copyright (C) 2010  CZ NIC, Inc. ("ISC")
+// Copyright (C) 2010  CZ NIC
+// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above