diff --git a/Cantera/clib/src/Cabinet.h b/Cantera/clib/src/Cabinet.h index 40049d8c0..d64d45c8f 100755 --- a/Cantera/clib/src/Cabinet.h +++ b/Cantera/clib/src/Cabinet.h @@ -164,7 +164,7 @@ public: return __table[n]; else { throw Cantera::CanteraError("item","index out of range"+Cantera::int2str(n)); - return __table[0]; + //return __table[0]; } } @@ -197,4 +197,11 @@ private: bool _can_delete; }; +//! Declaration stating that the storage for the static member +//! of each instanteated template will exist +/*! + * The actual storage will be allocated in .cpp files + */ +template Cabinet* Cabinet::__storage; + #endif diff --git a/Cantera/clib/src/ct.cpp b/Cantera/clib/src/ct.cpp index 28e66243e..d11df16d5 100755 --- a/Cantera/clib/src/ct.cpp +++ b/Cantera/clib/src/ct.cpp @@ -35,9 +35,6 @@ using namespace std; using namespace Cantera; -// declaration for the static storage -// -> The definition is located in ctxml.cpp -template<> Cabinet* Cabinet::__storage; inline XML_Node* _xml(int i) { return Cabinet::cabinet(false)->item(i); diff --git a/Cantera/clib/src/ctreactor.cpp b/Cantera/clib/src/ctreactor.cpp index 519792e94..f7c23910e 100755 --- a/Cantera/clib/src/ctreactor.cpp +++ b/Cantera/clib/src/ctreactor.cpp @@ -61,10 +61,6 @@ inline ThermoPhase* _th(int n) { } -// declaration for the static storage -// -> The definition is located in ctfunc.cpp -template<> Cabinet* Cabinet::__storage; - inline Func1* _func(int i) { return Cabinet::cabinet()->item(i); }