Changeset 1109 for XIOS/dev/branch_yushan/src/node/scalar.cpp
- Timestamp:
- 05/02/17 16:20:47 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/src/node/scalar.cpp
r976 r1109 27 27 { /* Ne rien faire de plus */ } 28 28 29 std::map<StdString, ETranformationType> CScalar::transformationMapList_ = std::map<StdString, ETranformationType>(); 30 bool CScalar::dummyTransformationMapList_ = CScalar::initializeTransformationMap(CScalar::transformationMapList_); 29 //std::map<StdString, ETranformationType> CScalar::transformationMapList_ = std::map<StdString, ETranformationType>(); 30 //bool CScalar::dummyTransformationMapList_ = CScalar::initializeTransformationMap(CScalar::transformationMapList_); 31 32 std::map<StdString, ETranformationType> *CScalar::transformationMapList_ptr = 0; 33 31 34 bool CScalar::initializeTransformationMap(std::map<StdString, ETranformationType>& m) 32 35 { … … 34 37 m["extract_axis"] = TRANS_EXTRACT_AXIS_TO_SCALAR; 35 38 m["reduce_domain"] = TRANS_REDUCE_DOMAIN_TO_SCALAR; 39 } 40 41 bool CScalar::initializeTransformationMap() 42 { 43 CScalar::transformationMapList_ptr = new std::map<StdString, ETranformationType>(); 44 (*CScalar::transformationMapList_ptr)["reduce_axis"] = TRANS_REDUCE_AXIS_TO_SCALAR; 45 (*CScalar::transformationMapList_ptr)["extract_axis"] = TRANS_EXTRACT_AXIS_TO_SCALAR; 46 (*CScalar::transformationMapList_ptr)["reduce_domain"] = TRANS_REDUCE_DOMAIN_TO_SCALAR; 36 47 } 37 48 … … 147 158 148 159 nodeElementName = node.getElementName(); 149 std::map<StdString, ETranformationType>::const_iterator ite = transformationMapList_.end(), it; 150 it = transformationMapList_.find(nodeElementName); 160 if(CScalar::transformationMapList_ptr == 0) initializeTransformationMap(); 161 std::map<StdString, ETranformationType>::const_iterator ite = (*CScalar::transformationMapList_ptr).end(), it; 162 it = (*CScalar::transformationMapList_ptr).find(nodeElementName); 151 163 if (ite != it) 152 164 {
Note: See TracChangeset
for help on using the changeset viewer.