Fix Coverity CID 38555

This commit is contained in:
mikekaganski
2015-03-09 16:41:10 +10:00
parent 73a8fe2899
commit 02eb288fb3

View File

@@ -902,18 +902,13 @@ private:
std::size_t N;
bool enabled;
public:
/// Destructor
IdealHelmholtzCP0PolyT(){N = 0; enabled = false;};
IdealHelmholtzCP0PolyT()
: Tc(_HUGE), T0(_HUGE), tau0(_HUGE), N(0), enabled(false) {}
/// Constructor with std::vectors
IdealHelmholtzCP0PolyT(const std::vector<CoolPropDbl> &c, const std::vector<CoolPropDbl> &t, double Tc, double T0)
: c(c), t(t), Tc(Tc), T0(T0)
{
assert(c.size() == t.size());
tau0 = Tc/T0;
enabled = true;
N = c.size();
};
: c(c), t(t), Tc(Tc), T0(T0), tau0(Tc/T0), N(c.size()), enabled(true)
{ assert(c.size() == t.size()); }
void extend(const std::vector<CoolPropDbl> &c, const std::vector<CoolPropDbl> &t)
{
@@ -922,9 +917,6 @@ public:
N += c.size();
}
/// Destructor
~IdealHelmholtzCP0PolyT(){};
bool is_enabled(){return enabled;};
void to_json(rapidjson::Value &el, rapidjson::Document &doc);