Fixed compilation errors on solaris.
This commit is contained in:
parent
4b349de72b
commit
e2fb5d3483
2 changed files with 18 additions and 10 deletions
|
|
@ -14,6 +14,8 @@
|
|||
* See file License.txt for licensing information.
|
||||
*/
|
||||
|
||||
#include "ct_defs.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
|
|
|
|||
|
|
@ -1423,28 +1423,34 @@ protected:
|
|||
|
||||
doublereal toSI(std::string unit) {
|
||||
doublereal f = Unit::units()->toSI(unit);
|
||||
if (f) return f;
|
||||
else throw CanteraError("toSI","unknown unit string: "+unit);
|
||||
//return 1.0;
|
||||
if (f) {
|
||||
return f;
|
||||
} else {
|
||||
throw CanteraError("toSI","unknown unit string: "+unit);
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
doublereal actEnergyToSI(std::string unit) {
|
||||
doublereal f = Unit::units()->actEnergyToSI(unit);
|
||||
if (f) return f;
|
||||
else return 1.0;
|
||||
if (f) {
|
||||
return f;
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
string canteraRoot() {
|
||||
char* ctroot = 0;
|
||||
ctroot = getenv("CANTERA_ROOT");
|
||||
if (ctroot != 0) { return string(ctroot); }
|
||||
else {
|
||||
if (ctroot != 0) {
|
||||
return string(ctroot);
|
||||
}
|
||||
#ifdef CANTERA_ROOT
|
||||
return string(CANTERA_ROOT);
|
||||
return string(CANTERA_ROOT);
|
||||
#else
|
||||
return "";
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// exceptions
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue