Fixed compilation errors on solaris.

This commit is contained in:
Harry Moffat 2010-02-09 19:57:02 +00:00
parent 4b349de72b
commit e2fb5d3483
2 changed files with 18 additions and 10 deletions

View file

@ -14,6 +14,8 @@
* See file License.txt for licensing information.
*/
#include "ct_defs.h"
#include <stdexcept>
#include <string>

View file

@ -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