diff --git a/opm/parser/eclipse/Units/UnitSystem.hpp b/opm/parser/eclipse/Units/UnitSystem.hpp index 8bd7395e7..6e3806edf 100644 --- a/opm/parser/eclipse/Units/UnitSystem.hpp +++ b/opm/parser/eclipse/Units/UnitSystem.hpp @@ -66,7 +66,7 @@ namespace Opm { water_inverse_formation_volume_factor, }; - UnitSystem(UnitType unit = UnitType::UNIT_TYPE_METRIC); + explicit UnitSystem(UnitType unit = UnitType::UNIT_TYPE_METRIC); const std::string& getName() const; UnitType getType() const; diff --git a/opm/parser/eclipse/Units/tests/UnitTests.cpp b/opm/parser/eclipse/Units/tests/UnitTests.cpp index 167ca6b9b..826dc7cb0 100644 --- a/opm/parser/eclipse/Units/tests/UnitTests.cpp +++ b/opm/parser/eclipse/Units/tests/UnitTests.cpp @@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(DimensionEqual) { namespace Opm { inline std::ostream& operator<<( std::ostream& stream, const UnitSystem& us ) { - return stream << us.getName() << " :: " << us.getType(); + return stream << us.getName() << " :: " << static_cast(us.getType()); } }