Use of deprecated functions generates compiler warnings
This commit is contained in:
parent
f1e807d314
commit
3648bfef39
8 changed files with 21 additions and 20 deletions
|
|
@ -26,6 +26,16 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
// Warn about deprecated functions at compile time
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define DEPRECATED(func) func __attribute__ ((deprecated))
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define DEPRECATED(func) __declspec(deprecated) func
|
||||||
|
#else
|
||||||
|
#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
|
||||||
|
#define DEPRECATED(func) func
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Namespace for the Cantera kernel.
|
* Namespace for the Cantera kernel.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -551,7 +551,7 @@ public:
|
||||||
* ThermoPhase objects.
|
* ThermoPhase objects.
|
||||||
* switch to uploadMoleFractionsFromPhases();
|
* switch to uploadMoleFractionsFromPhases();
|
||||||
*/
|
*/
|
||||||
void updateMoleFractions();
|
DEPRECATED(void updateMoleFractions());
|
||||||
|
|
||||||
//! Update the locally-stored composition within this object
|
//! Update the locally-stored composition within this object
|
||||||
//! to match the current compositions of the phase objects.
|
//! to match the current compositions of the phase objects.
|
||||||
|
|
|
||||||
|
|
@ -144,10 +144,6 @@ public:
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
Kinetics();
|
Kinetics();
|
||||||
|
|
||||||
/// This constructor initializes with a starting phase.
|
|
||||||
/// @deprecated
|
|
||||||
// Kinetics(thermo_t* thermo);
|
|
||||||
|
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
virtual ~Kinetics();
|
virtual ~Kinetics();
|
||||||
|
|
||||||
|
|
@ -302,7 +298,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param n Index of the ThermoPhase being sought.
|
* @param n Index of the ThermoPhase being sought.
|
||||||
*/
|
*/
|
||||||
thermo_t& phase(size_t n=0) {
|
DEPRECATED(thermo_t& phase(size_t n=0)) {
|
||||||
deprecatedMethod("Kinetics","phase","thermo");
|
deprecatedMethod("Kinetics","phase","thermo");
|
||||||
return *m_thermo[n];
|
return *m_thermo[n];
|
||||||
}
|
}
|
||||||
|
|
@ -314,7 +310,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param n Index of the ThermoPhase being sought.
|
* @param n Index of the ThermoPhase being sought.
|
||||||
*/
|
*/
|
||||||
const thermo_t& phase(size_t n=0) const {
|
DEPRECATED(const thermo_t& phase(size_t n=0) const) {
|
||||||
deprecatedMethod("Kinetics","phase","thermo");
|
deprecatedMethod("Kinetics","phase","thermo");
|
||||||
return *m_thermo[n];
|
return *m_thermo[n];
|
||||||
}
|
}
|
||||||
|
|
@ -1061,7 +1057,6 @@ protected:
|
||||||
*/
|
*/
|
||||||
size_t m_surfphase;
|
size_t m_surfphase;
|
||||||
|
|
||||||
|
|
||||||
//! Phase Index where reactions are assumed to be taking place
|
//! Phase Index where reactions are assumed to be taking place
|
||||||
/*!
|
/*!
|
||||||
* We calculate this by assuming that the phase with the lowest dimensionality is the phase where reactions
|
* We calculate this by assuming that the phase with the lowest dimensionality is the phase where reactions
|
||||||
|
|
|
||||||
|
|
@ -2143,7 +2143,7 @@ public:
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* The getPartialMolarVolumes() expression is more precise.
|
* The getPartialMolarVolumes() expression is more precise.
|
||||||
*/
|
*/
|
||||||
double speciesMolarVolume(int k) const;
|
DEPRECATED(double speciesMolarVolume(int k) const);
|
||||||
|
|
||||||
|
|
||||||
//! Value of the Debye Huckel constant as a function of temperature
|
//! Value of the Debye Huckel constant as a function of temperature
|
||||||
|
|
|
||||||
|
|
@ -470,7 +470,7 @@ public:
|
||||||
*
|
*
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
void getMolecularWeights(int iwt, doublereal* weights) const;
|
DEPRECATED(void getMolecularWeights(int iwt, doublereal* weights) const);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy the vector of molecular weights into array weights.
|
* Copy the vector of molecular weights into array weights.
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ class SpeciesThermo1 : public SpeciesThermo
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! base constructor
|
//! base constructor
|
||||||
SpeciesThermo1();
|
DEPRECATED(SpeciesThermo1());
|
||||||
//! destructor
|
//! destructor
|
||||||
virtual ~SpeciesThermo1();
|
virtual ~SpeciesThermo1();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -249,23 +249,19 @@ public:
|
||||||
|
|
||||||
//! Returns an integer index number.
|
//! Returns an integer index number.
|
||||||
/*!
|
/*!
|
||||||
* This is for internal use
|
* @internal This is for internal use
|
||||||
* of Cantera, and may be removed in the future.
|
* of Cantera, and may be removed in the future.
|
||||||
*
|
*
|
||||||
* @return Returns the index number
|
* @return Returns the index number
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
*/
|
*/
|
||||||
size_t index() const ;
|
size_t index() const;
|
||||||
|
|
||||||
//! Set an integer index number.
|
//! Set an integer index number.
|
||||||
/*!
|
/*!
|
||||||
* This is for internal use of
|
* @internal This is for internal use of
|
||||||
* Cantera, and may be removed in the future.
|
* Cantera, and may be removed in the future.
|
||||||
*
|
*
|
||||||
* @param i index value
|
* @param i index value
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
*/
|
*/
|
||||||
void setIndex(size_t i);
|
void setIndex(size_t i);
|
||||||
|
|
||||||
|
|
@ -353,7 +349,7 @@ public:
|
||||||
*
|
*
|
||||||
* @deprecated This doesn't seem to be the essential input; it should just be the mobility.
|
* @deprecated This doesn't seem to be the essential input; it should just be the mobility.
|
||||||
*/
|
*/
|
||||||
virtual void mobilityRatio(double* mobRat) {
|
DEPRECATED(virtual void mobilityRatio(double* mobRat)) {
|
||||||
err("mobilityRatio");
|
err("mobilityRatio");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ void MultiPhase::init()
|
||||||
/// mole fractions stored in the phase objects
|
/// mole fractions stored in the phase objects
|
||||||
m_init = true;
|
m_init = true;
|
||||||
|
|
||||||
updateMoleFractions();
|
uploadMoleFractionsFromPhases();
|
||||||
|
|
||||||
updatePhases();
|
updatePhases();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue