Future proof rippled by changing variable name 'requires' to 'require'

'requires' is a keyword in C++20.

https://en.cppreference.com/w/cpp/keyword/requires
This commit is contained in:
Robert Zhang
2021-04-14 09:53:45 -07:00
committed by manojsdoshi
parent f1a9e8840f
commit 2f0231025f
3 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ class Env;
struct JTx struct JTx
{ {
Json::Value jv; Json::Value jv;
requires_t requires; requires_t require;
std::optional<TER> ter = TER{tesSUCCESS}; std::optional<TER> ter = TER{tesSUCCESS};
bool fill_fee = true; bool fill_fee = true;
bool fill_seq = true; bool fill_seq = true;

View File

@@ -362,7 +362,7 @@ Env::postconditions(JTx const& jt, TER ter, bool didApply)
--trace_; --trace_;
test.log << pretty(jt.jv) << std::endl; test.log << pretty(jt.jv) << std::endl;
} }
for (auto const& f : jt.requires) for (auto const& f : jt.require)
f(*this); f(*this);
} }

View File

@@ -74,7 +74,7 @@ public:
void void
operator()(Env&, JTx& jt) const operator()(Env&, JTx& jt) const
{ {
jt.requires.emplace_back(cond_); jt.require.emplace_back(cond_);
} }
}; };