Tidy up hardened containers (RIPD-380):

* Rename hardened containers for clarity
* Fixes https://ripplelabs.atlassian.net/browse/RIPD-380
This commit is contained in:
Howard Hinnant
2014-07-28 09:01:32 -07:00
committed by Vinnie Falco
parent e6f4eedb1e
commit 58547f6997
64 changed files with 179 additions and 170 deletions

View File

@@ -37,8 +37,7 @@ public:
}
};
typedef ripple::unordered_map <RipplePublicKey, Info,
beast::hardened_hash<RipplePublicKey>> MapType;
typedef hardened_hash_map <RipplePublicKey, Info> MapType;
ChosenList (std::size_t expectedSize = 0)
{

View File

@@ -21,7 +21,6 @@
#define RIPPLE_VALIDATORS_LOGIC_H_INCLUDED
#include <memory>
#include <unordered_map>
namespace ripple {
namespace Validators {
@@ -68,9 +67,7 @@ public:
// Holds the internal list of trusted validators
//
typedef ripple::unordered_map <
RipplePublicKey, Validator,
beast::hardened_hash<RipplePublicKey>> ValidatorTable;
typedef hardened_hash_map <RipplePublicKey, Validator> ValidatorTable;
ValidatorTable m_validators;
// Filters duplicate validations

View File

@@ -67,8 +67,7 @@ template <class Key,
class CycledMap
{
private:
typedef ripple::unordered_map <
Key, T, Hash, KeyEqual, Allocator> ContainerType;
typedef hash_map <Key, T, Hash, KeyEqual, Allocator> ContainerType;
typedef typename ContainerType::iterator iterator;
public:

View File

@@ -42,9 +42,8 @@ private:
/** Holds the state of all recent ledgers for this validator. */
/** @{ */
typedef CycledMap <RippleLedgerHash, Ledger, Count,
beast::hardened_hash<RippleLedgerHash>,
RippleLedgerHash::key_equal> LedgerMap;
typedef CycledMap <RippleLedgerHash, Ledger, Count, beast::hardened_hash<>,
RippleLedgerHash::key_equal> LedgerMap;
LedgerMap m_ledgers;
/** @} */