Removed #ifdef for TYPENAME_KEYWORD
This definition was used to remove the "typename" qualifier from some declarations when using MSVC, but the use of the "typename" keyword in the contexts where it is used in Cantera are allowed in all versions of Visual Studio since (at least) VS.NET 2003.
This commit is contained in:
parent
afdf3fb2d1
commit
6798f18c4e
5 changed files with 9 additions and 24 deletions
|
|
@ -31,14 +31,6 @@
|
|||
*/
|
||||
namespace Cantera {
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#define TYPENAME_KEYWORD
|
||||
#else
|
||||
//! create a define for the typename command
|
||||
#define TYPENAME_KEYWORD typename
|
||||
#endif
|
||||
|
||||
#undef CHEMKIN_COMPATIBILITY_MODE
|
||||
|
||||
//! Creates a pointer to the start of the raw data for a ctvector
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace Cantera {
|
|||
template<class T>
|
||||
inline void divide_each(T& x, const T& y) {
|
||||
std::transform(x.begin(), x.end(), y.begin(),
|
||||
x.begin(), std::divides<TYPENAME_KEYWORD T::value_type>());
|
||||
x.begin(), std::divides<typename T::value_type>());
|
||||
}
|
||||
|
||||
//! Multiply each element of x by the corresponding element of y.
|
||||
|
|
@ -62,7 +62,7 @@ namespace Cantera {
|
|||
template<class T>
|
||||
inline void multiply_each(T& x, const T& y) {
|
||||
std::transform(x.begin(), x.end(), y.begin(),
|
||||
x.begin(), std::multiplies<TYPENAME_KEYWORD T::value_type>());
|
||||
x.begin(), std::multiplies<typename T::value_type>());
|
||||
}
|
||||
|
||||
//! Multiply each element of x by scale_factor.
|
||||
|
|
|
|||
|
|
@ -15,13 +15,6 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
#ifdef WIN32
|
||||
#define TYPENAME_KEYWORD
|
||||
#else
|
||||
#define TYPENAME_KEYWORD typename
|
||||
#endif
|
||||
|
||||
|
||||
namespace ckr {
|
||||
|
||||
/**
|
||||
|
|
@ -33,7 +26,7 @@ namespace ckr {
|
|||
template<class K, class V>
|
||||
void getMapKeys(const map<K,V>& mp, vector<K>& keys) {
|
||||
keys.clear();
|
||||
TYPENAME_KEYWORD map<K,V>::const_iterator i = mp.begin();
|
||||
typename map<K,V>::const_iterator i = mp.begin();
|
||||
for (; i != mp.end(); ++i) keys.push_back(i->first);
|
||||
}
|
||||
|
||||
|
|
@ -47,7 +40,7 @@ void getMapKeys(const map<K,V>& mp, vector<K>& keys) {
|
|||
template<class K, class V>
|
||||
void getMapValues(const map<K,V>& mp, vector<V>& values) {
|
||||
values.clear();
|
||||
TYPENAME_KEYWORD map<K,V>::const_iterator i = mp.begin();
|
||||
typename map<K,V>::const_iterator i = mp.begin();
|
||||
for (; i != mp.end(); ++i) values.push_back(i->second);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ namespace Cantera {
|
|||
* the call to update_C.
|
||||
*/
|
||||
void update_C(const doublereal* c) {
|
||||
TYPENAME_KEYWORD std::vector<R>::iterator b = m_rates.begin();
|
||||
TYPENAME_KEYWORD std::vector<R>::iterator e = m_rates.end();
|
||||
typename std::vector<R>::iterator b = m_rates.begin();
|
||||
typename std::vector<R>::iterator e = m_rates.end();
|
||||
int i = 0;
|
||||
for (; b != e; ++b, ++i) {
|
||||
b->update_C(c);
|
||||
|
|
@ -95,8 +95,8 @@ namespace Cantera {
|
|||
* preloaded with the constant rate coefficients.
|
||||
*/
|
||||
void update(doublereal T, doublereal logT, doublereal* values) {
|
||||
TYPENAME_KEYWORD std::vector<R>::const_iterator b = m_rates.begin();
|
||||
TYPENAME_KEYWORD std::vector<R>::const_iterator e = m_rates.end();
|
||||
typename std::vector<R>::const_iterator b = m_rates.begin();
|
||||
typename std::vector<R>::const_iterator e = m_rates.end();
|
||||
doublereal recipT = 1.0/T;
|
||||
int i = 0;
|
||||
for (; b != e; ++b, ++i) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Cantera {
|
|||
}
|
||||
|
||||
void update(const vector_fp& conc, doublereal ctot, workPtr work) {
|
||||
TYPENAME_KEYWORD std::vector<_E>::const_iterator b = m_concm.begin();
|
||||
typename std::vector<_E>::const_iterator b = m_concm.begin();
|
||||
//doublereal* v = m_values.begin();
|
||||
for (; b != m_concm.end(); ++b, ++work)
|
||||
*work = b->update(conc, ctot);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue