Changeset 1134 for XIOS/dev/branch_yushan_merged/src/node/scalar.cpp
- Timestamp:
- 05/16/17 17:54:30 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/src/node/scalar.cpp
r1117 r1134 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 … … 164 175 165 176 nodeElementName = node.getElementName(); 166 std::map<StdString, ETranformationType>::const_iterator ite = transformationMapList_.end(), it; 167 it = transformationMapList_.find(nodeElementName); 177 if(CScalar::transformationMapList_ptr == 0) initializeTransformationMap(); 178 std::map<StdString, ETranformationType>::const_iterator ite = (*CScalar::transformationMapList_ptr).end(), it; 179 it = (*CScalar::transformationMapList_ptr).find(nodeElementName); 168 180 if (ite != it) 169 181 {
Note: See TracChangeset
for help on using the changeset viewer.