Casting to pointer-to-const makes sense. Casting to a const
value (even a const pointer) doesn't.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit
46b40274d42e54bf80adb0086b02e9785e0646db)
int RGWHTTPHeadersCollector::receive_header(void * const ptr, const size_t len)
{
- const boost::string_ref header_line(static_cast<const char * const>(ptr), len);
+ const boost::string_ref header_line(static_cast<const char *>(ptr), len);
/* We're tokening the line that way due to backward compatibility. */
const size_t sep_loc = header_line.find_first_of(" \t:");