Ensure the 'injector' member is initialized, compared etc.

This commit is contained in:
Atgeirr Flø Rasmussen 2024-06-06 16:31:46 +02:00
parent 9c744190eb
commit 74fc1d4a67
2 changed files with 5 additions and 2 deletions

View File

@ -62,6 +62,7 @@ template<class Scalar>
PerfData<Scalar> PerfData<Scalar>::serializationTestObject()
{
PerfData result;
result.injector = true;
result.pressure_first_connection = 1.0;
result.pressure = {2.0, 3.0, 4.0};
result.rates = {5.0, 6.0};
@ -130,7 +131,8 @@ bool PerfData<Scalar>::try_assign(const PerfData& other)
template<class Scalar>
bool PerfData<Scalar>::operator==(const PerfData& rhs) const
{
return (this->pressure_first_connection == rhs.pressure_first_connection)
return (this->injector == rhs.injector)
&& (this->pressure_first_connection == rhs.pressure_first_connection)
&& (this->pressure == rhs.pressure)
&& (this->rates == rhs.rates)
&& (this->phase_rates == rhs.phase_rates)

View File

@ -32,7 +32,7 @@ template<class Scalar>
class PerfData
{
private:
bool injector;
bool injector{false};
public:
PerfData() = default;
@ -50,6 +50,7 @@ public:
template<class Serializer>
void serializeOp(Serializer& serializer)
{
serializer(injector);
serializer(pressure_first_connection);
serializer(pressure);
serializer(rates);