[MOAB-dev] r5347 - MOAB/trunk/itaps/imesh
jvporter at wisc.edu
jvporter at wisc.edu
Wed Jan 25 22:53:17 CST 2012
Author: jvporter
Date: 2012-01-25 22:53:16 -0600 (Wed, 25 Jan 2012)
New Revision: 5347
Modified:
MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
Log:
Eliminate some warnings
Modified: MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp 2012-01-25 18:36:13 UTC (rev 5346)
+++ MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp 2012-01-26 04:53:16 UTC (rev 5347)
@@ -1258,8 +1258,7 @@
iMeshP_PartHandle local_part,
iMeshP_Part other_part,
const PartMap& map,
- iBase_EntityHandle vtx_handles[3],
- int& num_vtx_handles )
+ std::vector<iBase_EntityHandle> &vtx_handles )
{
int ierr, rank;
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
@@ -1332,29 +1331,29 @@
case 0:
return iBase_FAILURE;
case 1: // upper right
+ vtx_handles.resize(1);
vtx_handles[0] = verts[2][0];
- num_vtx_handles = 1;
break;
case 2: // right
- std::copy( verts[2], verts[2]+3, vtx_handles );
- num_vtx_handles = 3;
+ vtx_handles.resize(3);
+ std::copy( verts[2], verts[2]+3, vtx_handles.begin() );
break;
case -1: // above
+ vtx_handles.resize(3);
vtx_handles[0] = verts[0][0];
vtx_handles[1] = verts[1][0];
vtx_handles[2] = verts[2][0];
- num_vtx_handles = 3;
break;
case -2: // left
- std::copy( verts[0], verts[0]+3, vtx_handles );
- num_vtx_handles = 3;
+ vtx_handles.resize(3);
+ std::copy( verts[0], verts[0]+3, vtx_handles.begin() );
break;
case -3: // upper left
+ vtx_handles.resize(1);
vtx_handles[0] = verts[0][0];
- num_vtx_handles = 1;
break;
default:
- num_vtx_handles = 0;
+ vtx_handles.clear();
break;
}
More information about the moab-dev
mailing list