From fd27bcd7ee599cffb16b28717f629f6d2e0d6b15 Mon Sep 17 00:00:00 2001 From: Tom Ritchford Date: Wed, 9 Jul 2014 14:36:23 -0400 Subject: [PATCH] Various tidying: * Fix unused variable warnings. * Clean unused items from TER. * Improvement to LES use of shared_ptr. --- beast/http/impl/message_parser.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/beast/http/impl/message_parser.cpp b/beast/http/impl/message_parser.cpp index a2caefa4a..61db041d4 100644 --- a/beast/http/impl/message_parser.cpp +++ b/beast/http/impl/message_parser.cpp @@ -72,8 +72,9 @@ message_parser::check_url() { checked_url_ = true; auto const p (reinterpret_cast (&state_)); - ec_ = on_request (joyent::convert_http_method ( - joyent::http_method(p->method)), p->http_major, p->http_minor, url_); + ec_ = on_request ( + joyent::convert_http_method (joyent::http_method(p->method)), + p->http_major, p->http_minor, url_); if (ec_) return 1; } @@ -96,7 +97,6 @@ message_parser::do_url (char const* in, std::size_t bytes) int message_parser::do_status (char const* in, std::size_t bytes) { - auto const p (reinterpret_cast (&state_)); return ec_ ? 1 : 0; } @@ -132,8 +132,6 @@ message_parser::do_headers_done () { if (check_url()) return 1; - auto const p (reinterpret_cast (&state_)); - bool const keep_alive (joyent::http_should_keep_alive (p) != 0); if (! value_.empty()) { ec_ = on_field (field_, value_); @@ -148,17 +146,12 @@ message_parser::do_headers_done () int message_parser::do_body (char const* in, std::size_t bytes) { - auto const p (reinterpret_cast (&state_)); - bool const is_final ( - joyent::http_body_is_final (p) != 0); return ec_ ? 1 : 0; } int message_parser::do_message_complete () { - auto const p (reinterpret_cast (&state_)); - bool const keep_alive (joyent::http_should_keep_alive (p) != 0); complete_ = true; return 0; }