lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [6213] Resolve two marked defects


From: Greg Chicares
Subject: [lmi-commits] [6213] Resolve two marked defects
Date: Thu, 23 Jul 2015 09:42:20 +0000

Revision: 6213
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6213
Author:   chicares
Date:     2015-07-23 09:42:20 +0000 (Thu, 23 Jul 2015)
Log Message:
-----------
Resolve two marked defects

Modified Paths:
--------------
    lmi/trunk/crc32.hpp

Modified: lmi/trunk/crc32.hpp
===================================================================
--- lmi/trunk/crc32.hpp 2015-07-23 09:41:19 UTC (rev 6212)
+++ lmi/trunk/crc32.hpp 2015-07-23 09:42:20 UTC (rev 6213)
@@ -28,7 +28,7 @@
 
 #include "so_attributes.hpp"
 
-#include <cstring> // std::strlen()
+#include <cstring>                      // std::strlen()
 #include <string>
 #include <vector>
 
@@ -69,7 +69,8 @@
 };
 
 // operator+=() inline implementations.
-// TODO ?? Try to use one template for the bodies of these implementations.
+// SOMEDAY !! Use one template for the bodies of these implementations
+// (C++11 will make that easier).
 
 inline CRC& CRC::operator+=(                    bool    z)
     {return update(reinterpret_cast<unsigned char const*>(&z), sizeof(z));}
@@ -109,8 +110,8 @@
     }
 inline CRC& CRC::operator+=(unsigned            char const* z)
     {
-    // TODO ?? std::strlen() is defined only for char const* arguments;
-    // does that mean that this reinterpret_cast is required?
+    // std::strlen() is defined only for char const* arguments, so the
+    // cast is required.
     return update(z, std::strlen(reinterpret_cast<char const*>(z)));
     }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]