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:
Nik Bougalis
2015-06-02 21:46:49 -07:00
parent c2814308f1
commit 8c68eff460
3 changed files with 21 additions and 20 deletions

View File

@@ -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