]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
add boost::container::string version of burtleCI
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 20 Jun 2025 10:41:38 +0000 (12:41 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 24 Jun 2025 08:32:12 +0000 (10:32 +0200)
pdns/burtle.hh

index 7ec333d4b128475b493871d3daa7f6c7fa4ee481..e2ce4e0c094809bb84c759917589223ad3f4ddfe 100644 (file)
@@ -183,3 +183,8 @@ inline uint32_t burtleCI(const std::string &k, uint32_t initval)
 {
   return burtleCI(reinterpret_cast<const unsigned char *>(k.data()), k.length(), initval); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast): can't static_cast because of sign difference
 }
+
+inline uint32_t burtleCI(const boost::container::string &k, uint32_t initval)
+{
+  return burtleCI(reinterpret_cast<const unsigned char *>(k.data()), k.length(), initval); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast): can't static_cast because of sign difference
+}