We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a1f1bd commit 692ed64Copy full SHA for 692ed64
1 file changed
src/wallet/addresses/uri.cpp
@@ -30,20 +30,16 @@ using namespace boost::urls;
30
31
bool uri::decode(const std::string& encoded) NOEXCEPT
32
{
33
- if (encoded.empty())
34
- return false;
35
-
36
- // throw std::length_error only for s.size() > url_view::max_size.
37
- BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
38
- const auto parts = parse_uri_reference(encoded);
39
- BC_POP_WARNING()
40
41
- if (parts)
+ if (!encoded.empty())
42
43
try
44
45
- url_ = { parts.value() };
46
- return true;
+ // throw std::length_error only for s.size() > url_view::max_size.
+ if (const auto parts = parse_uri_reference(encoded))
+ {
+ url_ = { parts.value() };
+ return true;
+ }
47
}
48
catch (...)
49
0 commit comments