Browse Source

[1207] add comments

Jelte Jansen 13 years ago
parent
commit
abcaba7690
2 changed files with 6 additions and 0 deletions
  1. 3 0
      src/bin/auth/command.cc
  2. 3 0
      src/bin/auth/tests/auth_srv_unittest.cc

+ 3 - 0
src/bin/auth/command.cc

@@ -229,6 +229,9 @@ private:
                       " is not found in data source");
         }
 
+        // It would appear that dynamic_cast does not work on all systems;
+        // it seems to confuse the RTTI system, resulting in NULL return
+        // values. So we use the more dangerous static_pointer_cast here.
         old_zone_finder_ = boost::static_pointer_cast<InMemoryZoneFinder>(
             result.zone_finder);
 

+ 3 - 0
src/bin/auth/tests/auth_srv_unittest.cc

@@ -91,6 +91,9 @@ protected:
     }
 
     ~AuthSrvTest() {
+        // Clear the message now; depending on the RTTI implementation,
+        // type information may be lost if the message is cleared
+        // automatically later, so as a precaution we do it now.
         parse_message->clear(Message::PARSE);
     }