From 2f0231025f4ac6283d13ea716df56d7c19784ae2 Mon Sep 17 00:00:00 2001 From: Robert Zhang Date: Wed, 14 Apr 2021 09:53:45 -0700 Subject: [PATCH] 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 --- src/test/jtx/JTx.h | 2 +- src/test/jtx/impl/Env.cpp | 2 +- src/test/jtx/require.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/jtx/JTx.h b/src/test/jtx/JTx.h index 8a2557d55..5f73c25f4 100644 --- a/src/test/jtx/JTx.h +++ b/src/test/jtx/JTx.h @@ -42,7 +42,7 @@ class Env; struct JTx { Json::Value jv; - requires_t requires; + requires_t require; std::optional ter = TER{tesSUCCESS}; bool fill_fee = true; bool fill_seq = true; diff --git a/src/test/jtx/impl/Env.cpp b/src/test/jtx/impl/Env.cpp index d872f0666..242299aa5 100644 --- a/src/test/jtx/impl/Env.cpp +++ b/src/test/jtx/impl/Env.cpp @@ -362,7 +362,7 @@ Env::postconditions(JTx const& jt, TER ter, bool didApply) --trace_; test.log << pretty(jt.jv) << std::endl; } - for (auto const& f : jt.requires) + for (auto const& f : jt.require) f(*this); } diff --git a/src/test/jtx/require.h b/src/test/jtx/require.h index e9e923662..64b1f36b5 100644 --- a/src/test/jtx/require.h +++ b/src/test/jtx/require.h @@ -74,7 +74,7 @@ public: void operator()(Env&, JTx& jt) const { - jt.requires.emplace_back(cond_); + jt.require.emplace_back(cond_); } };