]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2442] updated comment for string::operator[] when it's empty
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 5 Dec 2012 18:43:06 +0000 (10:43 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 5 Dec 2012 18:43:06 +0000 (10:43 -0800)
this is actually ensured by the C++ standard lib spec.

src/lib/dns/tests/rdata_char_string_unittest.cc

index 83f05912804e6a53cbb4338019b766862c6e13f6..9d236229c18255b321c4fa6a84dea0197906d3b0 100644 (file)
@@ -52,7 +52,7 @@ protected:
 MasterToken::StringRegion
 createStringRegion(const std::string& str) {
     MasterToken::StringRegion region;
-    region.beg = &str[0];       // note this works even if str is empty
+    region.beg = &str[0]; // note std ensures this works even if str is empty
     region.len = str.size();
     return (region);
 }