mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Cleanup object templates:
* Avoid exposing class members - use boost::iterator_range instead * Use std::make_unique instead of naked new
This commit is contained in:
@@ -22,10 +22,6 @@
|
||||
|
||||
namespace ripple {
|
||||
|
||||
SOTemplate::SOTemplate ()
|
||||
{
|
||||
}
|
||||
|
||||
void SOTemplate::push_back (SOElement const& r)
|
||||
{
|
||||
// Ensure there is the enough space in the index mapping
|
||||
@@ -52,7 +48,7 @@ void SOTemplate::push_back (SOElement const& r)
|
||||
|
||||
// Append the new element.
|
||||
//
|
||||
mTypes.push_back (value_type (new SOElement (r)));
|
||||
mTypes.push_back (std::make_unique<SOElement const> (r));
|
||||
}
|
||||
|
||||
int SOTemplate::getIndex (SField const& f) const
|
||||
|
||||
Reference in New Issue
Block a user