Default: Updates to ParserItem::equal()
1. The boolean flag m_defaultSet() is included in the actual
comparison.
2. The compare functions is implemented as a functions template.
This commit is contained in:
@@ -79,16 +79,9 @@ namespace Opm
|
||||
|
||||
bool ParserFloatItem::equal(const ParserItem& other) const
|
||||
{
|
||||
// cast to a pointer to avoid bad_cast exception
|
||||
const ParserFloatItem* rhs = dynamic_cast<const ParserFloatItem*>(&other);
|
||||
if (rhs && ParserItem::equal(other) && (getDefault() == rhs->getDefault())) {
|
||||
return equalDimensions( other );
|
||||
}
|
||||
else
|
||||
return false;
|
||||
return (ParserItemEqual<ParserFloatItem>(this , other) && equalDimensions(other));
|
||||
}
|
||||
|
||||
|
||||
bool ParserFloatItem::equalDimensions(const ParserItem& other) const {
|
||||
bool equal_=false;
|
||||
if (other.numDimensions() == numDimensions()) {
|
||||
|
||||
Reference in New Issue
Block a user