diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c4fb064..3b454de3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Version 264: * Handle overflow in max size calculation in `basic_dynamic_body` * Fix unused variable warnings in tests * Fix missing initializer warning in `basic_fields` +* Remove unused functions in `impl/static_string.hpp` -------------------------------------------------------------------------------- diff --git a/include/boost/beast/core/impl/static_string.hpp b/include/boost/beast/core/impl/static_string.hpp index 13354d6d..2e3e5617 100644 --- a/include/boost/beast/core/impl/static_string.hpp +++ b/include/boost/beast/core/impl/static_string.hpp @@ -558,64 +558,6 @@ assign_char(CharT, std::false_type) -> "max_size() == 0"}); } -namespace detail { - -template -static_string -to_static_string(Integer x, std::true_type) -{ - if(x == 0) - return {'0'}; - static_string s; - if(x < 0) - { - x = -x; - char buf[max_digits(sizeof(x))]; - char* p = buf; - for(;x > 0; x /= 10) - *p++ = "0123456789"[x % 10]; - s.resize(1 + p - buf); - s[0] = '-'; - auto d = &s[1]; - while(p > buf) - *d++ = *--p; - } - else - { - char buf[max_digits(sizeof(x))]; - char* p = buf; - for(;x > 0; x /= 10) - *p++ = "0123456789"[x % 10]; - s.resize(p - buf); - auto d = &s[0]; - while(p > buf) - *d++ = *--p; - } - return s; -} - -template -static_string -to_static_string(Integer x, std::false_type) -{ - if(x == 0) - return {'0'}; - char buf[max_digits(sizeof(x))]; - char* p = buf; - for(;x > 0; x /= 10) - *p++ = "0123456789"[x % 10]; - static_string s; - s.resize(p - buf); - auto d = &s[0]; - while(p > buf) - *d++ = *--p; - return s; -} - -} // detail - template static_string to_static_string(Integer x)