Remove unused DeckItem size hint

This commit is contained in:
Joakim Hove
2019-09-16 07:31:19 +02:00
parent 622a093315
commit 17c6d7dbad
3 changed files with 9 additions and 17 deletions

View File

@@ -35,10 +35,10 @@ namespace Opm {
class DeckItem {
public:
DeckItem() = default;
DeckItem( const std::string&, int, size_t size_hint = 8 );
DeckItem( const std::string&, double, size_t size_hint = 8 );
DeckItem( const std::string&, std::string, size_t size_hint = 8 );
DeckItem( const std::string&, UDAValue, size_t size_hint = 8 );
DeckItem( const std::string&, int);
DeckItem( const std::string&, double);
DeckItem( const std::string&, std::string);
DeckItem( const std::string&, UDAValue);
const std::string& name() const;

View File

@@ -71,36 +71,28 @@ const std::vector< UDAValue >& DeckItem::value_ref< UDAValue >() const {
}
DeckItem::DeckItem( const std::string& nm, int, size_t hint ) :
DeckItem::DeckItem( const std::string& nm, int) :
type( get_type< int >() ),
item_name( nm )
{
this->ival.reserve( hint );
this->defaulted.reserve( hint );
}
DeckItem::DeckItem( const std::string& nm, double, size_t hint ) :
DeckItem::DeckItem( const std::string& nm, double) :
type( get_type< double >() ),
item_name( nm )
{
this->dval.reserve( hint );
this->defaulted.reserve( hint );
}
DeckItem::DeckItem( const std::string& nm, UDAValue , size_t hint ) :
DeckItem::DeckItem( const std::string& nm, UDAValue) :
type( get_type< UDAValue >() ),
item_name( nm )
{
this->uval.reserve( hint );
this->defaulted.reserve( hint );
}
DeckItem::DeckItem( const std::string& nm, std::string, size_t hint ) :
DeckItem::DeckItem( const std::string& nm, std::string) :
type( get_type< std::string >() ),
item_name( nm )
{
this->sval.reserve( hint );
this->defaulted.reserve( hint );
}
const std::string& DeckItem::name() const {

View File

@@ -475,7 +475,7 @@ namespace {
template< typename T >
DeckItem scan_item( const ParserItem& p, RawRecord& record ) {
DeckItem item( p.name(), T(), record.size() );
DeckItem item( p.name(), T());
bool parse_raw = p.parseRaw();
if( p.sizeType() == ParserItem::item_size::ALL ) {