]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove unused create_n_reserve() 15678/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 14 Jun 2017 14:55:43 +0000 (10:55 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 14 Jun 2017 14:55:43 +0000 (10:55 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_string.h

index d5c459a53d9da8cf5d16aeaacd9478e275515ef5..311add42c7744cbcd94235ffca5b8c79c5b34007 100644 (file)
@@ -113,19 +113,6 @@ sview2cstr(const boost::string_view& sv)
   return cstr;
 }
 
-/* We need this helper function because the interface of std::string::reserve
- * doesn't provide the chaining ability in the type append(). It's required
- * to concatenate string without reallocations in a way const-correct manner. */
-template <class StringT>
-static inline StringT create_n_reserve(const size_t reserve_len)
-{
-  StringT ret;
-  /* I would love to see reserve() returning "basic_string&" instead of "void"
-   * in the standard library! */
-  ret.reserve(reserve_len);
-  return ret;
-}
-
 /* std::strlen() isn't guaranteed to be computable at compile-time. Although
  * newer GCCs actually do that, Clang doesn't. Please be aware this function
  * IS NOT A DROP-IN REPLACEMENT FOR STRLEN -- it returns a different result