Merge pull request #952 from atgeirr/fix-contructor-bug

Make constructor explicit, fix operator<<.
This commit is contained in:
Joakim Hove
2016-10-25 15:58:15 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ namespace Opm {
water_inverse_formation_volume_factor, 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; const std::string& getName() const;
UnitType getType() const; UnitType getType() const;

View File

@@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(DimensionEqual) {
namespace Opm { namespace Opm {
inline std::ostream& operator<<( std::ostream& stream, const UnitSystem& us ) { inline std::ostream& operator<<( std::ostream& stream, const UnitSystem& us ) {
return stream << us.getName() << " :: " << us.getType(); return stream << us.getName() << " :: " << static_cast<int>(us.getType());
} }
} }