From a4216ec9d08140fe31932b277938addc7e30af2f Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 16 Oct 2015 14:46:33 +0400 Subject: [PATCH] Enable C++0x/C++11 support --- src/SMESH/SMESH_MeshEditor.cxx | 2 +- src/SMESH_I/SMESH_Gen_i.cxx | 13 +++++++------ src/StdMeshers/StdMeshers_Cartesian_3D.cxx | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 2c2fc35e0..5e7171660 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -8528,7 +8528,7 @@ SMESH_MeshEditor::SewFreeBorder (const SMDS_MeshNode* theBordFirstNode, // sew the border to the side 2 // ============================ - int nbNodes[] = { nSide[0].size(), nSide[1].size() }; + int nbNodes[] = { (int)nSide[0].size(), (int)nSide[1].size() }; int maxNbNodes = Max( nbNodes[0], nbNodes[1] ); bool toMergeConformal = ( nbNodes[0] == nbNodes[1] ); diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index e61aea50b..36c67c01e 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -2585,6 +2585,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray, aGroup = aListOfGroups[iG]; aGroupType = aGroup->GetType(); aGroupName = aGroup->GetName(); + string aName = aGroupName.in(); // convert a list of IDs anNewIDs->length( aGroup->Size() ); @@ -2602,15 +2603,15 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray, // check a current group name and type don't have identical ones in final mesh aListOfNewGroups.clear(); - TGroupsMap::iterator anIter = aGroupsMap.find( make_pair( aGroupName, aGroupType )); + TGroupsMap::iterator anIter = aGroupsMap.find( make_pair( aName, aGroupType )); if ( anIter == aGroupsMap.end() ) { // add a new group in the mesh - aNewGroup = aNewImpl->CreateGroup( aGroupType, aGroupName ); + aNewGroup = aNewImpl->CreateGroup( aGroupType, aGroupName.in() ); // add elements into new group aNewGroup->Add( anNewIDs ); aListOfNewGroups.push_back(aNewGroup); - aGroupsMap.insert(make_pair( make_pair(aGroupName, aGroupType), aListOfNewGroups )); + aGroupsMap.insert(make_pair( make_pair(aName, aGroupType), aListOfNewGroups )); } else if ( theUniteIdenticalGroups ) { @@ -2621,18 +2622,18 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray, else { // rename identical groups - aNewGroup = aNewImpl->CreateGroup(aGroupType, aGroupName); + aNewGroup = aNewImpl->CreateGroup(aGroupType, aGroupName.in()); aNewGroup->Add( anNewIDs ); TListOfNewGroups& aNewGroups = anIter->second; string aNewGroupName; if (aNewGroups.size() == 1) { - aNewGroupName = string(aGroupName) + "_1"; + aNewGroupName = aName + "_1"; aNewGroups.front()->SetName(aNewGroupName.c_str()); } char aGroupNum[128]; sprintf(aGroupNum, "%u", aNewGroups.size()+1); - aNewGroupName = string(aGroupName) + "_" + string(aGroupNum); + aNewGroupName = aName + "_" + string(aGroupNum); aNewGroup->SetName(aNewGroupName.c_str()); aNewGroups.push_back(aNewGroup); } diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index 139257213..52ac9f8f3 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -3135,7 +3135,7 @@ namespace if ( !_vIntNodes.empty() ) return false; - const int ijk[3] = { _i, _j, _k }; + const size_t ijk[3] = { _i, _j, _k }; F_IntersectPoint curIntPnt; // consider a cell to be in a hole if all links in any direction -- 2.30.2