mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
chore: Enable clang-tidy bugprone-suspicious-stringview-data-usage check (#6467)
This commit is contained in:
@@ -1280,7 +1280,7 @@ r.ripple.com:51235
|
||||
for (auto const& t : tests)
|
||||
{
|
||||
Section s;
|
||||
s.append(t.line.data());
|
||||
s.append(std::string(t.line));
|
||||
BEAST_EXPECT(s.had_trailing_comments() == t.had_comment);
|
||||
if (t.field.empty())
|
||||
{
|
||||
@@ -1289,7 +1289,7 @@ r.ripple.com:51235
|
||||
else
|
||||
{
|
||||
std::string field;
|
||||
BEAST_EXPECTS(set(field, t.field.data(), s), t.line);
|
||||
BEAST_EXPECTS(set(field, std::string(t.field), s), t.line);
|
||||
BEAST_EXPECTS(field == t.expect, t.line);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -502,11 +502,12 @@ public:
|
||||
Json::Value params;
|
||||
params[jss::account] = account.human();
|
||||
auto const info = env.rpc("json", "account_info", to_string(params));
|
||||
auto const name = std::string(fName);
|
||||
|
||||
std::optional<bool> res;
|
||||
if (info[jss::result][jss::status] == "success" &&
|
||||
info[jss::result][jss::account_flags].isMember(fName.data()))
|
||||
res.emplace(info[jss::result][jss::account_flags][fName.data()].asBool());
|
||||
info[jss::result][jss::account_flags].isMember(name))
|
||||
res.emplace(info[jss::result][jss::account_flags][name].asBool());
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user