[Thermo] Remove unnecessary copy constructors & assignment operators
These just did the same thing as the compiler-generated ones, so there's no reason for these to exist.
This commit is contained in:
parent
76344ea628
commit
31d04f04b0
11 changed files with 39 additions and 206 deletions
34
include/cantera/matlab.h
Normal file
34
include/cantera/matlab.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* @file ctxml.h
|
||||
*/
|
||||
#ifndef CTC_XML_H
|
||||
#define CTC_XML_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
int xml_new(const char* name);
|
||||
int xml_get_XML_File(const char* file, int debug);
|
||||
int xml_del(int i);
|
||||
int xml_clear();
|
||||
int xml_copy(int i);
|
||||
int xml_assign(int i, int j);
|
||||
int xml_build(int i, const char* file);
|
||||
int xml_preprocess_and_build(int i, const char* file, int debug);
|
||||
int xml_attrib(int i, const char* key, char* value);
|
||||
int xml_addAttrib(int i, const char* key, const char* value);
|
||||
int xml_addComment(int i, const char* comment);
|
||||
int xml_value(int i, char* value);
|
||||
int xml_tag(int i, char* tag);
|
||||
int xml_child(int i, const char* loc);
|
||||
int xml_child_bynumber(int i, int m);
|
||||
int xml_findID(int i, const char* id);
|
||||
int xml_findByName(int i, const char* nm);
|
||||
int xml_nChildren(int i);
|
||||
int xml_addChild(int i, const char* name, const char* value);
|
||||
int xml_addChildNode(int i, int j);
|
||||
int xml_write(int i, const char* file);
|
||||
int xml_removeChild(int i, int j);
|
||||
int ctml_getFloatArray(int i, size_t n, double* data, int iconvert);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -69,18 +69,9 @@ public:
|
|||
std::copy(coeffs+2, coeffs + 2 + m_nFreqs, m_freq.begin());
|
||||
}
|
||||
|
||||
/// Copy Constructor
|
||||
Adsorbate(const Adsorbate& b) :
|
||||
m_be(b.m_be) {
|
||||
m_nFreqs = b.m_nFreqs;
|
||||
std::copy(b.m_freq.begin(), b.m_freq.begin() + m_nFreqs,
|
||||
m_freq.begin());
|
||||
}
|
||||
|
||||
virtual SpeciesThermoInterpType*
|
||||
duplMyselfAsSpeciesThermoInterpType() const {
|
||||
Adsorbate* np = new Adsorbate(*this);
|
||||
return (SpeciesThermoInterpType*) np;
|
||||
return new Adsorbate(*this);
|
||||
}
|
||||
|
||||
virtual int reportType() const {
|
||||
|
|
|
|||
|
|
@ -85,12 +85,6 @@ public:
|
|||
*/
|
||||
ConstCpPoly(double tlow, double thigh, double pref, const double* coeffs);
|
||||
|
||||
//! copy constructor
|
||||
ConstCpPoly(const ConstCpPoly&);
|
||||
|
||||
//! Assignment operator
|
||||
ConstCpPoly& operator=(const ConstCpPoly&);
|
||||
|
||||
virtual SpeciesThermoInterpType*
|
||||
duplMyselfAsSpeciesThermoInterpType() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -131,12 +131,6 @@ public:
|
|||
*/
|
||||
Mu0Poly(double tlow, double thigh, double pref, const double* coeffs);
|
||||
|
||||
//! Copy constructor
|
||||
Mu0Poly(const Mu0Poly&);
|
||||
|
||||
//! Assignment operator
|
||||
Mu0Poly& operator=(const Mu0Poly&);
|
||||
|
||||
virtual SpeciesThermoInterpType*
|
||||
duplMyselfAsSpeciesThermoInterpType() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -98,18 +98,6 @@ public:
|
|||
*/
|
||||
Nasa9Poly1(double tlow, double thigh, double pref, const double* coeffs);
|
||||
|
||||
//! copy constructor
|
||||
/*!
|
||||
* @param b object to be copied
|
||||
*/
|
||||
Nasa9Poly1(const Nasa9Poly1& b);
|
||||
|
||||
//! assignment operator
|
||||
/*!
|
||||
* @param b object to be copied
|
||||
*/
|
||||
Nasa9Poly1& operator=(const Nasa9Poly1& b);
|
||||
|
||||
virtual SpeciesThermoInterpType*
|
||||
duplMyselfAsSpeciesThermoInterpType() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -87,32 +87,9 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
//! copy constructor
|
||||
/*!
|
||||
* @param b object to be copied
|
||||
*/
|
||||
NasaPoly1(const NasaPoly1& b) :
|
||||
SpeciesThermoInterpType(b),
|
||||
m_coeff(b.m_coeff)
|
||||
{
|
||||
}
|
||||
|
||||
//! assignment operator
|
||||
/*!
|
||||
* @param b object to be copied
|
||||
*/
|
||||
NasaPoly1& operator=(const NasaPoly1& b) {
|
||||
if (&b != this) {
|
||||
SpeciesThermoInterpType::operator=(b);
|
||||
m_coeff = b.m_coeff;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual SpeciesThermoInterpType*
|
||||
duplMyselfAsSpeciesThermoInterpType() const {
|
||||
NasaPoly1* np = new NasaPoly1(*this);
|
||||
return (SpeciesThermoInterpType*) np;
|
||||
return new NasaPoly1(*this);
|
||||
}
|
||||
|
||||
virtual int reportType() const {
|
||||
|
|
|
|||
|
|
@ -93,33 +93,6 @@ public:
|
|||
m_coeff(coeffs, coeffs + 15) {
|
||||
}
|
||||
|
||||
//! Copy Constructor
|
||||
/*!
|
||||
* @param b object to be copied.
|
||||
*/
|
||||
NasaPoly2(const NasaPoly2& b) :
|
||||
SpeciesThermoInterpType(b),
|
||||
m_midT(b.m_midT),
|
||||
mnp_low(b.mnp_low),
|
||||
mnp_high(b.mnp_high),
|
||||
m_coeff(b.m_coeff) {
|
||||
}
|
||||
|
||||
//! Assignment operator
|
||||
/*!
|
||||
* @param b object to be copied.
|
||||
*/
|
||||
NasaPoly2& operator=(const NasaPoly2& b) {
|
||||
if (&b != this) {
|
||||
SpeciesThermoInterpType::operator=(b);
|
||||
m_midT = b.m_midT;
|
||||
m_coeff = b.m_coeff;
|
||||
mnp_low = b.mnp_low;
|
||||
mnp_high = b.mnp_high;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual SpeciesThermoInterpType*
|
||||
duplMyselfAsSpeciesThermoInterpType() const {
|
||||
NasaPoly2* np = new NasaPoly2(*this);
|
||||
|
|
|
|||
|
|
@ -106,32 +106,9 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
//! copy constructor
|
||||
/*!
|
||||
* @param b object to be copied
|
||||
*/
|
||||
ShomatePoly(const ShomatePoly& b) :
|
||||
SpeciesThermoInterpType(b),
|
||||
m_coeff(b.m_coeff)
|
||||
{
|
||||
}
|
||||
|
||||
//! Assignment operator
|
||||
/*!
|
||||
* @param b
|
||||
*/
|
||||
ShomatePoly& operator=(const ShomatePoly& b) {
|
||||
if (&b != this) {
|
||||
SpeciesThermoInterpType::operator=(b);
|
||||
m_coeff = b.m_coeff;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual SpeciesThermoInterpType*
|
||||
duplMyselfAsSpeciesThermoInterpType() const {
|
||||
ShomatePoly* sp = new ShomatePoly(*this);
|
||||
return (SpeciesThermoInterpType*) sp;
|
||||
return new ShomatePoly(*this);
|
||||
}
|
||||
|
||||
virtual int reportType() const {
|
||||
|
|
@ -361,38 +338,9 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
//! Copy constructor
|
||||
/*!
|
||||
* @param b object to be copied.
|
||||
*/
|
||||
ShomatePoly2(const ShomatePoly2& b) :
|
||||
SpeciesThermoInterpType(b),
|
||||
m_midT(b.m_midT),
|
||||
msp_low(b.msp_low),
|
||||
msp_high(b.msp_high),
|
||||
m_coeff(b.m_coeff)
|
||||
{
|
||||
}
|
||||
|
||||
//! Assignment operator
|
||||
/*!
|
||||
* @param b object to be copied.
|
||||
*/
|
||||
ShomatePoly2& operator=(const ShomatePoly2& b) {
|
||||
if (&b != this) {
|
||||
SpeciesThermoInterpType::operator=(b);
|
||||
m_midT = b.m_midT;
|
||||
m_coeff = b.m_coeff;
|
||||
msp_low = b.msp_low;
|
||||
msp_high = b.msp_high;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual SpeciesThermoInterpType*
|
||||
duplMyselfAsSpeciesThermoInterpType() const {
|
||||
ShomatePoly2* sp = new ShomatePoly2(*this);
|
||||
return (SpeciesThermoInterpType*) sp;
|
||||
return new ShomatePoly2(*this);
|
||||
}
|
||||
|
||||
virtual int reportType() const {
|
||||
|
|
|
|||
|
|
@ -42,29 +42,6 @@ ConstCpPoly::ConstCpPoly(double tlow, double thigh, double pref,
|
|||
m_logt0 = log(m_t0);
|
||||
}
|
||||
|
||||
ConstCpPoly::ConstCpPoly(const ConstCpPoly& b) :
|
||||
SpeciesThermoInterpType(b),
|
||||
m_t0(b.m_t0),
|
||||
m_cp0_R(b.m_cp0_R),
|
||||
m_h0_R(b.m_h0_R),
|
||||
m_s0_R(b.m_s0_R),
|
||||
m_logt0(b.m_logt0)
|
||||
{
|
||||
}
|
||||
|
||||
ConstCpPoly& ConstCpPoly::operator=(const ConstCpPoly& b)
|
||||
{
|
||||
if (&b != this) {
|
||||
m_t0 = b.m_t0;
|
||||
m_cp0_R = b.m_cp0_R;
|
||||
m_h0_R = b.m_h0_R;
|
||||
m_s0_R = b.m_s0_R;
|
||||
m_logt0 = b.m_logt0;
|
||||
SpeciesThermoInterpType::operator=(b);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
SpeciesThermoInterpType*
|
||||
ConstCpPoly::duplMyselfAsSpeciesThermoInterpType() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,33 +37,6 @@ Mu0Poly::Mu0Poly(double tlow, double thigh, double pref, const double* coeffs) :
|
|||
processCoeffs(coeffs);
|
||||
}
|
||||
|
||||
Mu0Poly::Mu0Poly(const Mu0Poly& b)
|
||||
: SpeciesThermoInterpType(b),
|
||||
m_numIntervals(b.m_numIntervals),
|
||||
m_H298(b.m_H298),
|
||||
m_t0_int(b.m_t0_int),
|
||||
m_mu0_R_int(b.m_mu0_R_int),
|
||||
m_h0_R_int(b.m_h0_R_int),
|
||||
m_s0_R_int(b.m_s0_R_int),
|
||||
m_cp0_R_int(b.m_cp0_R_int)
|
||||
{
|
||||
}
|
||||
|
||||
Mu0Poly& Mu0Poly::operator=(const Mu0Poly& b)
|
||||
{
|
||||
if (&b != this) {
|
||||
SpeciesThermoInterpType::operator=(b);
|
||||
m_numIntervals = b.m_numIntervals;
|
||||
m_H298 = b.m_H298;
|
||||
m_t0_int = b.m_t0_int;
|
||||
m_mu0_R_int = b.m_mu0_R_int;
|
||||
m_h0_R_int = b.m_h0_R_int;
|
||||
m_s0_R_int = b.m_s0_R_int;
|
||||
m_cp0_R_int = b.m_cp0_R_int;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
SpeciesThermoInterpType*
|
||||
Mu0Poly::duplMyselfAsSpeciesThermoInterpType() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,23 +36,7 @@ Nasa9Poly1::Nasa9Poly1(double tlow, double thigh, double pref,
|
|||
{
|
||||
}
|
||||
|
||||
Nasa9Poly1::Nasa9Poly1(const Nasa9Poly1& b) :
|
||||
SpeciesThermoInterpType(b),
|
||||
m_coeff(b.m_coeff)
|
||||
{
|
||||
}
|
||||
|
||||
Nasa9Poly1& Nasa9Poly1::operator=(const Nasa9Poly1& b)
|
||||
{
|
||||
if (&b != this) {
|
||||
SpeciesThermoInterpType::operator=(b);
|
||||
m_coeff = b.m_coeff;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
SpeciesThermoInterpType*
|
||||
Nasa9Poly1::duplMyselfAsSpeciesThermoInterpType() const
|
||||
SpeciesThermoInterpType* Nasa9Poly1::duplMyselfAsSpeciesThermoInterpType() const
|
||||
{
|
||||
return new Nasa9Poly1(*this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue