From: Casey Bodley Date: Wed, 14 Jun 2017 14:55:43 +0000 (-0400) Subject: rgw: remove unused create_n_reserve() X-Git-Tag: v12.1.0~100^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=195cc9919deee30c753e33c835a6d727a96fae41;p=ceph.git rgw: remove unused create_n_reserve() Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h index d5c459a53d9d..311add42c774 100644 --- a/src/rgw/rgw_string.h +++ b/src/rgw/rgw_string.h @@ -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 -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