Commit 4f9eeeb3 authored by wangdawei's avatar wangdawei

test

parent dfd6f7ef
Pipeline #1540 canceled with stages
...@@ -117,27 +117,33 @@ void MapArea::init() ...@@ -117,27 +117,33 @@ void MapArea::init()
map<ulong, MapArea::MeshInfo> MapArea::getMeshInfoMap() map<ulong, MapArea::MeshInfo> MapArea::getMeshInfoMap()
{ {
directory_iterator mesh_iter(mapPath_); // directory_iterator mesh_iter(mapPath_);
directory_iterator mesh_end_iter; // directory_iterator mesh_end_iter;
// map<ulong, MeshInfo> meshInfoMap;
// for(; mesh_iter != mesh_end_iter; mesh_iter++) {
// if(mesh_iter->path().extension().string() != ".stream"){
// continue;
// }
// string mesh_path = mesh_iter->path().string();
// string mesh_name = mesh_iter->path().stem().string();
// ulong meshId = 000;
// try {
// meshId = stoi(mesh_name);
// }
// catch (std::invalid_argument&){
// LOG(INFO) << "header.mesh_id() is not int";
// }
// MeshInfo meshInfo;
// meshInfo.meshId = meshId;
// meshInfo.meshPath = mesh_path;
// meshInfoMap.insert(make_pair(meshId, meshInfo));
// }
map<ulong, MeshInfo> meshInfoMap; map<ulong, MeshInfo> meshInfoMap;
for(; mesh_iter != mesh_end_iter; mesh_iter++) { MeshInfo meshInfo;
if(mesh_iter->path().extension().string() != ".stream"){ meshInfo.meshId = stoi(path(mapPath_).stem().string());
continue; meshInfo.meshPath = mapPath_;
} meshInfoMap.insert(make_pair(meshInfo.meshId, meshInfo));
string mesh_path = mesh_iter->path().string();
string mesh_name = mesh_iter->path().stem().string();
ulong meshId = 000;
try {
meshId = stoi(mesh_name);
}
catch (std::invalid_argument&){
LOG(INFO) << "header.mesh_id() is not int";
}
MeshInfo meshInfo;
meshInfo.meshId = meshId;
meshInfo.meshPath = mesh_path;
meshInfoMap.insert(make_pair(meshId, meshInfo));
}
return meshInfoMap; return meshInfoMap;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment