mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-06 18:26:51 +00:00
chore: Fix tests for clang-tidy bugprone-unchecked-optional-access check (#6502)
This commit is contained in:
@@ -152,7 +152,7 @@ public:
|
||||
std::string const& normal = "")
|
||||
{
|
||||
auto const result = Endpoint::from_string_checked(s);
|
||||
if (!BEAST_EXPECT(result))
|
||||
if (BEAST_EXPECT(result); !result.has_value())
|
||||
return;
|
||||
if (!BEAST_EXPECT(result->address().is_v4()))
|
||||
return;
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
std::string const& normal = "")
|
||||
{
|
||||
auto result = Endpoint::from_string_checked(s);
|
||||
if (!BEAST_EXPECT(result))
|
||||
if (BEAST_EXPECT(result); !result.has_value())
|
||||
return;
|
||||
if (!BEAST_EXPECT(result->address().is_v6()))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user