mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 21:34:46 +02:00
Fix -Wdangling-reference warnings
This commit is contained in:
committed by
Mohammad Nejati
parent
b502789d89
commit
eaaeb8b36b
@@ -24,8 +24,9 @@ public:
|
|||||||
check(char const* name, error ev)
|
check(char const* name, error ev)
|
||||||
{
|
{
|
||||||
auto const ec = make_error_code(ev);
|
auto const ec = make_error_code(ev);
|
||||||
auto const& cat = make_error_code(
|
auto const ec_http = make_error_code(
|
||||||
static_cast<http::error>(0)).category();
|
static_cast<http::error>(0));
|
||||||
|
auto const& cat = ec_http.category();
|
||||||
BEAST_EXPECT(std::string(ec.category().name()) == name);
|
BEAST_EXPECT(std::string(ec.category().name()) == name);
|
||||||
BEAST_EXPECT(! ec.message().empty());
|
BEAST_EXPECT(! ec.message().empty());
|
||||||
BEAST_EXPECT(
|
BEAST_EXPECT(
|
||||||
|
@@ -473,9 +473,8 @@ public:
|
|||||||
{
|
{
|
||||||
if(se.code() == test::error::test_failure)
|
if(se.code() == test::error::test_failure)
|
||||||
throw;
|
throw;
|
||||||
BEAST_EXPECTS(se.code().category() ==
|
auto const ec = make_error_code(static_cast<zlib::error>(0));
|
||||||
make_error_code(static_cast<
|
BEAST_EXPECTS(se.code().category() == ec.category(),
|
||||||
zlib::error>(0)).category(),
|
|
||||||
se.code().message());
|
se.code().message());
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
|
@@ -23,8 +23,9 @@ public:
|
|||||||
void check(char const* name, error ev)
|
void check(char const* name, error ev)
|
||||||
{
|
{
|
||||||
auto const ec = make_error_code(ev);
|
auto const ec = make_error_code(ev);
|
||||||
auto const& cat = make_error_code(
|
auto const ec_zlib = make_error_code(
|
||||||
static_cast<zlib::error>(0)).category();
|
static_cast<zlib::error>(0));
|
||||||
|
auto const& cat = ec_zlib.category();
|
||||||
BEAST_EXPECT(std::string{ec.category().name()} == name);
|
BEAST_EXPECT(std::string{ec.category().name()} == name);
|
||||||
BEAST_EXPECT(! ec.message().empty());
|
BEAST_EXPECT(! ec.message().empty());
|
||||||
BEAST_EXPECT(
|
BEAST_EXPECT(
|
||||||
|
Reference in New Issue
Block a user