Modernize code:

* Clean STBase-derived class creation interfaces
* Annotate overriden STBase virtual functions
* Optimize path deserialization
* Prefer range-based for
* Prefer std::unique_ptr
* Remove BOOST_FOREACH
This commit is contained in:
Nik Bougalis
2014-12-31 22:02:14 -08:00
parent e742da73bd
commit 47593730d6
43 changed files with 638 additions and 547 deletions

View File

@@ -24,6 +24,7 @@
#include <ripple/core/ConfigSections.h>
#include <boost/format.hpp>
#include <boost/tokenizer.hpp>
#include <algorithm>
namespace ripple {
/** Track the list of "amendments"
@@ -498,16 +499,19 @@ void
AmendmentTableImpl<AppApiFacade>::doValidation (Ledger::ref lastClosedLedger,
STObject& baseValidation)
{
amendmentList_t lAmendments = getDesired();
auto lAmendments = getDesired();
if (lAmendments.empty())
return;
STVector256 vAmendments (sfAmendments);
for (auto const& uAmendment : lAmendments)
vAmendments.push_back (uAmendment);
vAmendments.sort ();
baseValidation.setFieldV256 (sfAmendments, vAmendments);
STVector256 amendments (sfAmendments);
for (auto const& id : lAmendments)
amendments.push_back (id);
std::sort (amendments.begin (), amendments.end ());
baseValidation.setFieldV256 (sfAmendments, amendments);
}
template<class AppApiFacade>