Commit 15a15fc8 authored by Dan Wu's avatar Dan Wu
Browse files

Updated code to use prefix ++/-- operators for non-primitive types and fixed...

Updated code to use prefix ++/-- operators for non-primitive types and fixed some typos in the comments.
parent dd70392f
......@@ -188,7 +188,7 @@ using namespace moab;
int num_in_range = from_range.size();
Range to_range;
Range::iterator rit;
for (rit = from_range.begin(); rit != from_range.end(); rit++) {
for (rit = from_range.begin(); rit != from_range.end(); ++rit) {
EntityHandle this_ent = *rit;
to_range.insert(this_ent);
}
......@@ -266,7 +266,7 @@ rval = moab->tag_create(“TEMPERATURE”, sizeof(double), MB_TAG_DENSE,
MB_TYPE_DOUBLE, temperature, &def_val);
// assign a value to vertices
for (Range::iterator vit = verts.begin();
vit != verts.end(); vit++)
vit != verts.end(); ++vit)
rval = moab->tag_set_data(temperature, &(*rit), 1, &new_val);
\endcode
......
......@@ -41,7 +41,7 @@ int main(int argc, char **argv) {
// for each child, get parents and do something with them
moab::Range::iterator ch_it, p_it;
for (ch_it = chsets.begin(); ch_it != chsets.end(); ch_it++) {
for (ch_it = chsets.begin(); ch_it != chsets.end(); ++ch_it) {
// get the children and put in child set list
psets.clear();
rval = mb ->get_parent_meshsets(*ch_it, psets);
......@@ -53,7 +53,7 @@ int main(int argc, char **argv) {
<< " parents." << std::endl;
if (2 == dim) {
for (p_it = psets.begin(); p_it != psets.end(); p_it++) {
for (p_it = psets.begin(); p_it != psets.end(); ++p_it) {
rval = mb->tag_get_data(gid_tag, &(*p_it), 1, &pgid);
rval = gt.get_sense(*ch_it, *p_it, sense);
if (moab::MB_SUCCESS != rval) continue;
......
......@@ -53,7 +53,7 @@ int main(int argc, char **argv) {
Range::iterator set_it;
// loop thru all the geometric entity sets
for (set_it = sets.begin(); set_it != sets.end(); set_it++) {
for (set_it = sets.begin(); set_it != sets.end(); ++set_it) {
EntityHandle this_set = *set_it;
......
......@@ -71,7 +71,7 @@ int main()
<< std::setw(10) << "Y"
<< std::setw(10) << "Z" << std::endl;
for(iter = connectivity.begin(); iter != connectivity.end(); iter++) {
for(iter = connectivity.begin(); iter != connectivity.end(); ++iter) {
rval = mbint.get_coords(&(*iter), 1, coord);
MBERR("get_coords", rval);
......@@ -103,7 +103,7 @@ int main()
unsigned count = 0;
const double PI = 3.14159265359;
const double ANGLE = PI/4;
for(iter = vertex_range.begin(); iter != vertex_range.end(); iter++) {
for(iter = vertex_range.begin(); iter != vertex_range.end(); ++iter) {
// Save the old coordinates:
double x = vertex_coords[count+0];
......
......@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
return 1;
}
std::cout << "Found " << ents.size() << " " << d << "-dimensional entities:" << std::endl;
for (moab::Range::iterator it = ents.begin(); it != ents.end(); it++) {
for (moab::Range::iterator it = ents.begin(); it != ents.end(); ++it) {
moab::EntityHandle ent = *it;
std::cout << "Found d=" << d << " entity "
<< mb->id_from_handle(ent) << "." << std::endl;
......
......@@ -324,13 +324,13 @@ void FBiGeom_getEnt2ndAdj(FBiGeom_Instance instance,
Range::iterator iter, jter, kter, end_jter;
Range::iterator end_iter = bridge_ents.end();
for (iter = bridge_ents.begin(); iter != end_iter; iter++) {
for (iter = bridge_ents.begin(); iter != end_iter; ++iter) {
rval = FBE_cast(instance)->getEntAdj(*iter, to_dimension,
tmp_ents);
CHKERR(rval, "Failed to get adjacent entities in FBiGeom_getEnt2ndAdj.");
for (jter = tmp_ents.begin(); jter != end_jter; jter++) {
for (jter = tmp_ents.begin(); jter != end_jter; ++jter) {
if (to_ents.find(*jter) == to_ents.end()) {
to_ents.insert(*jter);
}
......
......@@ -913,7 +913,7 @@ bool topology_adjacencies_test(FBiGeom_Instance geom) {
// check adjacencies in both directions
std::vector<iBase_EntityHandle>::iterator vit;
for (i = iBase_REGION; i >= iBase_VERTEX; i--) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); vit++) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); ++vit) {
iBase_EntityHandle this_gent = *vit;
// check downward adjacencies
......@@ -980,7 +980,7 @@ bool geometry_evaluation_test(FBiGeom_Instance geom) {
std::vector<iBase_EntityHandle>::iterator vit;
for (i = iBase_REGION; i >= iBase_VERTEX; i--) {
if (i != iBase_EDGE) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); vit++) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); ++vit) {
iBase_EntityHandle this_gent = *vit;
FBiGeom_getEntBoundBox(geom, this_gent, &min[0], &min[1], &min[2],
&max[0], &max[1], &max[2], &err);
......@@ -1029,7 +1029,7 @@ bool normals_test(FBiGeom_Instance geom) {
double normal[3] = {.0, .0, .0};
std::vector<iBase_EntityHandle>::iterator vit;
for (i = iBase_REGION; i > iBase_EDGE; i--) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); vit++) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); ++vit) {
iBase_EntityHandle this_gent = *vit;
FBiGeom_getEntBoundBox(geom, this_gent, &min[0], &min[1], &min[2],
&max[0], &max[1], &max[2], &err);
......
......@@ -943,7 +943,7 @@ bool topology_adjacencies_test(FBiGeom_Instance geom) {
// check adjacencies in both directions
std::vector<iBase_EntityHandle>::iterator vit;
for (i = iBase_REGION; i >= iBase_VERTEX; i--) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); vit++) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); ++vit) {
iBase_EntityHandle this_gent = *vit;
// check downward adjacencies
......@@ -1010,7 +1010,7 @@ bool geometry_evaluation_test(FBiGeom_Instance geom) {
std::vector<iBase_EntityHandle>::iterator vit;
for (i = iBase_REGION; i >= iBase_VERTEX; i--) {
if (i != iBase_EDGE) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); vit++) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); ++vit) {
iBase_EntityHandle this_gent = *vit;
FBiGeom_getEntBoundBox(geom, this_gent, &min[0], &min[1], &min[2],
&max[0], &max[1], &max[2], &err);
......@@ -1059,7 +1059,7 @@ bool normals_test(FBiGeom_Instance geom) {
double normal[3] = {.0, .0, .0};
std::vector<iBase_EntityHandle>::iterator vit;
for (i = iBase_REGION; i > iBase_EDGE; i--) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); vit++) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); ++vit) {
iBase_EntityHandle this_gent = *vit;
FBiGeom_getEntBoundBox(geom, this_gent, &min[0], &min[1], &min[2],
&max[0], &max[1], &max[2], &err);
......
......@@ -889,7 +889,7 @@ bool topology_adjacencies_test(FBiGeom_Instance geom)
// check adjacencies in both directions
std::vector<iBase_EntityHandle>::iterator vit;
for (i = iBase_REGION; i >= iBase_VERTEX; i--) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); vit++) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); ++vit) {
iBase_EntityHandle this_gent = *vit;
// check downward adjacencies
......@@ -957,7 +957,7 @@ bool geometry_evaluation_test(FBiGeom_Instance geom)
std::vector<iBase_EntityHandle>::iterator vit;
for (i = iBase_REGION; i >= iBase_VERTEX; i--) {
if (i != iBase_EDGE) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); vit++) {
for (vit = gentity_vectors[i].begin(); vit != gentity_vectors[i].end(); ++vit) {
iBase_EntityHandle this_gent = *vit;
FBiGeom_getEntBoundBox(geom, this_gent, &min[0], &min[1], &min[2],
&max[0], &max[1], &max[2], &err);
......
......@@ -1566,7 +1566,7 @@ void iMeshP_exchEntArrToPartsAll( iMesh_Instance instance,
// delete exchange list
std::vector<Range*>::iterator vit;
for (vit = exchange_ents.begin(); vit != exchange_ents.end(); vit++)
for (vit = exchange_ents.begin(); vit != exchange_ents.end(); ++vit)
delete (*vit);
RETURN (iBase_SUCCESS);
......@@ -1864,7 +1864,7 @@ void iMeshP_saveAll( iMesh_Instance instance,
Range::iterator rit;
int i;
for (i = 0, rit = pc->partition_sets().begin();
rit != pc->partition_sets().end(); rit++, i++)
rit != pc->partition_sets().end(); ++rit, i++)
(*part_handles)[i] = itaps_cast<iMeshP_PartHandle>(*rit);
RETURN(iBase_SUCCESS);
......
......@@ -2662,7 +2662,7 @@ extern "C" {
int k = 0;
// filter out entity sets here
for (iter = out_entities.begin(); iter != out_entities.end(); iter++)
for (iter = out_entities.begin(); iter != out_entities.end(); ++iter)
(*entity_handles)[k++] = (iBase_EntityHandle)*iter;
// now it's safe to set the size; set it to k, not out_entities.size(), to
......@@ -2876,11 +2876,11 @@ extern "C" {
// filter out entity sets here
if (iBase_ALL_TYPES == entity_type && iMesh_ALL_TOPOLOGIES == entity_topology) {
for (; iter != end_iter && MOABI->type_from_handle(*iter) != MBENTITYSET; iter++)
for (; iter != end_iter && MOABI->type_from_handle(*iter) != MBENTITYSET; ++iter)
(*entity_handles)[k++] = (iBase_EntityHandle)*iter;
}
else {
for (; iter != end_iter; iter++)
for (; iter != end_iter; ++iter)
(*entity_handles)[k++] = (iBase_EntityHandle)*iter;
}
......
......@@ -641,7 +641,7 @@ ErrorCode AEntityFactory::notify_create_entity(const EntityHandle entity,
tmp_result = get_adjacencies(entity, 0, false, verts);
if (MB_SUCCESS != tmp_result) return tmp_result;
for (std::vector<EntityHandle>::iterator vit = verts.begin();
vit != verts.end(); vit++)
vit != verts.end(); ++vit)
{
tmp_result = add_adjacency(*vit, entity);
if (MB_SUCCESS != tmp_result) result = tmp_result;
......@@ -834,7 +834,7 @@ ErrorCode AEntityFactory::get_down_adjacency_elements_poly(EntityHandle source_e
unsigned int start_sz = target_entities.size();
const EntityHandle *explicit_adjs;
int num_exp;
for (Range::iterator rit = adj_edges.begin(); rit != adj_edges.end(); rit++) {
for (Range::iterator rit = adj_edges.begin(); rit != adj_edges.end(); ++rit) {
this->get_adjacencies(*rit, explicit_adjs, num_exp);
if (NULL != explicit_adjs &&
std::find(explicit_adjs, explicit_adjs+num_exp, source_entity) !=
......@@ -1251,13 +1251,13 @@ ErrorCode AEntityFactory::notify_change_connectivity(EntityHandle entity,
if (mVertElemAdj == true) {
// update the vertex-entity adjacencies
std::vector<EntityHandle>::iterator adj_iter;
for (adj_iter = old_verts.begin(); adj_iter != old_verts.end(); adj_iter++) {
for (adj_iter = old_verts.begin(); adj_iter != old_verts.end(); ++adj_iter) {
if (std::find(new_verts.begin(), new_verts.end(), *adj_iter) == new_verts.end()) {
result = remove_adjacency(*adj_iter, entity);
if (MB_SUCCESS != result) return result;
}
}
for (adj_iter = new_verts.begin(); adj_iter != new_verts.end(); adj_iter++) {
for (adj_iter = new_verts.begin(); adj_iter != new_verts.end(); ++adj_iter) {
if (std::find(old_verts.begin(), old_verts.end(), *adj_iter) == old_verts.end()) {
result = add_adjacency(*adj_iter, entity);
if (MB_SUCCESS != result) return result;
......@@ -1302,7 +1302,7 @@ ErrorCode AEntityFactory::merge_adjust_adjacencies(EntityHandle entity_to_keep,
if(result != MB_SUCCESS)
return result;
// for any explicit ones, make them adjacent to keeper
for (Range::iterator rit = adjs.begin(); rit != adjs.end(); rit++) {
for (Range::iterator rit = adjs.begin(); rit != adjs.end(); ++rit) {
if (this->explicitly_adjacent(*rit, entity_to_remove)) {
result = this->add_adjacency(*rit, entity_to_keep);
if(result != MB_SUCCESS) return result;
......@@ -1373,11 +1373,11 @@ ErrorCode AEntityFactory::check_equiv_entities(EntityHandle entity_to_keep,
// algorithm:
// for each entity adjacent to removed entity:
EntityHandle two_ents[2];
for (Range::iterator rit_rm = adjs_remove.begin(); rit_rm != adjs_remove.end(); rit_rm++) {
for (Range::iterator rit_rm = adjs_remove.begin(); rit_rm != adjs_remove.end(); ++rit_rm) {
two_ents[0] = *rit_rm;
// - for each entity of same dimension adjacent to kept entity:
for (Range::iterator rit_kp = adjs_keep.begin(); rit_kp != adjs_keep.end(); rit_kp++) {
for (Range::iterator rit_kp = adjs_keep.begin(); rit_kp != adjs_keep.end(); ++rit_kp) {
if (TYPE_FROM_HANDLE(*rit_kp) != TYPE_FROM_HANDLE(*rit_rm)) continue;
Range all_verts;
......@@ -1417,7 +1417,7 @@ ErrorCode AEntityFactory::create_explicit_adjs(EntityHandle this_ent)
if (MB_SUCCESS != result) return result;
// - create explicit adjacency to these entities
for (Range::iterator rit = all_adjs.begin(); rit != all_adjs.end(); rit++) {
for (Range::iterator rit = all_adjs.begin(); rit != all_adjs.end(); ++rit) {
result = add_adjacency(this_ent, *rit);
if (MB_SUCCESS != result) return result;
}
......
......@@ -614,7 +614,7 @@ namespace moab {
// Find tree node at which the specified side of the box
// for this node was created.
AdaptiveKDTreeIter iter( *this ); // temporary iterator (don't modifiy *this)
AdaptiveKDTreeIter iter( *this ); // temporary iterator (don't modify *this)
node = iter.mStack.back();
iter.mStack.pop_back();
for (;;) {
......@@ -1553,13 +1553,13 @@ namespace moab {
result_list.reserve(result_list_nodes.size());
for (std::vector<NodeDistance>::iterator vit = result_list_nodes.begin();
vit != result_list_nodes.end(); vit++)
vit != result_list_nodes.end(); ++vit)
result_list.push_back((*vit).handle);
if (result_dists && distance > 0.0) {
result_dists->reserve(result_list_nodes.size());
for (std::vector<NodeDistance>::iterator vit = result_list_nodes.begin();
vit != result_list_nodes.end(); vit++)
vit != result_list_nodes.end(); ++vit)
result_dists->push_back((*vit).dist.length());
}
......@@ -1688,10 +1688,10 @@ namespace moab {
* position and the first entry in 'closest_pts' is the closest
* location on that triangle. Any other values in the lists must
* be other triangles for which the closest point is within the
* input tolernace of the closest closest point. This function
* input tolerance of the closest closest point. This function
* will update the lists as appropriate if any closer triangles
* or triangles within the tolerance of the current closest location
* are found. The fisrt entry is maintaned as the closest of the
* are found. The first entry is maintained as the closest of the
* list of triangles.
*/
/*
......@@ -2145,7 +2145,7 @@ namespace moab {
Range tree_sets, elem2d, elem3d, verts, all;
moab()->get_child_meshsets( myRoot, tree_sets, 0 );
for (Range::iterator rit = tree_sets.begin(); rit != tree_sets.end(); rit++) {
for (Range::iterator rit = tree_sets.begin(); rit != tree_sets.end(); ++rit) {
moab()->get_entities_by_dimension( *rit, 2, elem2d );
moab()->get_entities_by_dimension( *rit, 3, elem3d );
moab()->get_entities_by_type( *rit, MBVERTEX, verts );
......
......@@ -108,10 +108,10 @@ namespace moab
EntityHandle set_handle = startSetHandle;
std::vector<Node>::iterator it;
myTree.reserve(tree_nodes.size());
for (it = tree_nodes.begin(); it != tree_nodes.end(); it++, set_handle++) {
for (it = tree_nodes.begin(); it != tree_nodes.end(); ++it, set_handle++) {
if (it != tree_nodes.begin() && !it->entities.empty()) {
Range range;
for (HandleDataVec::iterator hit = it->entities.begin(); hit != it->entities.end(); hit++)
for (HandleDataVec::iterator hit = it->entities.begin(); hit != it->entities.end(); ++hit)
range.insert(hit->myHandle);
rval = mbImpl->add_entities(set_handle, range);
if (MB_SUCCESS != rval) return rval;
......@@ -274,7 +274,7 @@ namespace moab
data.split = middle_center;
data.nl = std::distance(begin, middle)+1;
data.nr = total-data.nl;
middle++;
++middle;
data.leftBox = begin->myBox;
data.rightBox = middle->myBox;
for(HandleDataVec::iterator i = begin; i != middle; ++i){
......@@ -452,7 +452,7 @@ namespace moab
rval = mbImpl->get_entities_by_handle(startSetHandle+index, entities);
if (MB_SUCCESS != rval) return rval;
for(Range::iterator i = entities.begin(); i != entities.end(); i++) {
for(Range::iterator i = entities.begin(); i != entities.end(); ++i) {
treeStats.traversalLeafObjectTests++;
myEval->set_ent_handle(*i);
myEval->reverse_eval(&point[0], iter_tol, inside_tol, params.array(), &is_inside);
......@@ -497,7 +497,7 @@ namespace moab
* sought point. This results in less overall traversal, and the correct
* cell is identified more quickly.
*/
//Sofar all testing confirms that this 'heuristic' is
//So far all testing confirms that this 'heuristic' is
//significantly slower.
//I conjecture this is because it gets improperly
//branch predicted..
......@@ -680,7 +680,7 @@ namespace moab
{
int i;
std::vector<Node>::iterator it;
for (it = nodes.begin(), i = 0; it != nodes.end(); it++, i++) {
for (it = nodes.begin(), i = 0; it != nodes.end(); ++it, i++) {
std::cout << "Node " << i << ": dim = " << it->dim << ", child = " << it->child << ", Lmax/Rmin = "
<< it->Lmax << "/" << it->Rmin << ", box = " << it->box << std::endl;
}
......@@ -691,7 +691,7 @@ namespace moab
{
int i;
std::vector<TreeNode>::iterator it;
for (it = myTree.begin(), i = 0; it != myTree.end(); it++, i++) {
for (it = myTree.begin(), i = 0; it != myTree.end(); ++it, i++) {
std::cout << "Node " << i << ": dim = " << it->dim << ", child = " << it->child << ", Lmax/Rmin = "
<< it->Lmax << "/" << it->Rmin << ", box = " << it->box << std::endl;
}
......
......@@ -306,7 +306,7 @@ void Core::deinitialize()
std::vector<ParallelComm*> pc_list;
ParallelComm::get_all_pcomm(this, pc_list);
for (std::vector<ParallelComm*>::iterator vit = pc_list.begin();
vit != pc_list.end(); vit++)
vit != pc_list.end(); ++vit)
delete *vit;
#endif
......@@ -744,7 +744,7 @@ ErrorCode Core::write_file( const char* file_name,
// Try all possible writers
for (ReaderWriterSet::iterator i = reader_writer_set()->begin();
i != reader_writer_set()->end(); i++) {
i != reader_writer_set()->end(); ++i) {
if ((file_type && !i->name().compare(file_type)) ||
i->writes_extension(ext.c_str())) {
......@@ -855,7 +855,7 @@ ErrorCode Core::get_vertex_coordinates(std::vector<double> &coords) const
int vec_pos = 0;
double xyz[3];
coords.resize(geometricDimension*num_verts);
for (Range::iterator it = vertices.begin(); it != vertices.end(); it++)
for (Range::iterator it = vertices.begin(); it != vertices.end(); ++it)
{
result = get_coords(&(*it), 1, xyz);MB_CHK_ERR(result);
......@@ -941,7 +941,7 @@ ErrorCode Core::get_coords(const Range& entities, double *coords) const
// for non-vertices...
ErrorCode rval = MB_SUCCESS;
for (Range::const_iterator rit(&(*i), i->first); rit != entities.end(); rit++) {
for (Range::const_iterator rit(&(*i), i->first); rit != entities.end(); ++rit) {
rval = get_coords(&(*rit), 1, coords);MB_CHK_ERR(rval);
coords += 3;
}
......@@ -999,7 +999,7 @@ ErrorCode Core::get_coords( const Range& entities,
// for non-vertices...
ErrorCode rval = MB_SUCCESS;
double xyz[3];
for (Range::const_iterator rit(&(*i), i->first); rit != entities.end(); rit++) {
for (Range::const_iterator rit(&(*i), i->first); rit != entities.end(); ++rit) {
rval = get_coords(&(*rit), 1, xyz);MB_CHK_ERR(rval);
*x_coords++ = xyz[0];
*y_coords++ = xyz[1];
......@@ -1118,7 +1118,7 @@ ErrorCode Core::set_coords(Range entity_handles, const double *coords)
int j = 0;
for (Range::iterator rit = entity_handles.begin(); rit != entity_handles.end(); rit++) {
for (Range::iterator rit = entity_handles.begin(); rit != entity_handles.end(); ++rit) {
if ( TYPE_FROM_HANDLE(*rit) == MBVERTEX )
{
EntitySequence* seq = 0;
......@@ -1155,7 +1155,7 @@ ErrorCode Core::get_connectivity_by_type(const EntityType type,
// now loop over these entities, getting connectivity for each
for (Range::iterator this_it = this_range.begin();
this_it != this_range.end();
this_it++)
++this_it)
{
const EntityHandle *connect_vec;
result = get_connectivity(*this_it, connect_vec, num_ents, true);MB_CHK_ERR(result);
......@@ -1377,7 +1377,7 @@ ErrorCode get_adjacencies_intersection( Core* mb,
++begin;
}
for (ITER from_it = begin; from_it != end; from_it++)
for (ITER from_it = begin; from_it != end; ++from_it)
{
// running results kept in adj_entities; clear temp_vec, which is working space
temp_vec.clear();
......@@ -1478,7 +1478,7 @@ ErrorCode get_adjacencies_intersection_ahf(Core *mb,
++begin;
}
for (ITER from_it = begin; from_it != end; from_it++)
for (ITER from_it = begin; from_it != end; ++from_it)
{
// running results kept in adj_entities; clear temp_vec, which is working space
temp_vec.clear();
......@@ -1787,7 +1787,7 @@ ErrorCode Core::add_adjacencies(const EntityHandle entity_handle,
{
ErrorCode result = MB_SUCCESS;
for (Range::iterator rit = adjacencies.begin(); rit != adjacencies.end(); rit++) {
for (Range::iterator rit = adjacencies.begin(); rit != adjacencies.end(); ++rit) {
result = aEntityFactory->add_adjacency(entity_handle, *rit, both_ways);MB_CHK_ERR(result);
}
......@@ -2001,7 +2001,7 @@ ErrorCode Core::get_entities_by_handle(const EntityHandle meshset,
result = mseq->get_entities( sequence_manager(), meshset, entities, recursive );MB_CHK_ERR(result);
}
else {
// iterate backards so range insertion is quicker
// iterate backwards so range insertion is quicker
for (EntityType type = MBENTITYSET; type >= MBVERTEX; --type)
sequence_manager()->get_entities( type, entities );
}
......@@ -2777,7 +2777,7 @@ ErrorCode Core::delete_entities(const Range &range)
result = temp_result;
}
for (Range::const_reverse_iterator rit = range.rbegin(); rit != range.rend(); rit++) {
for (Range::const_reverse_iterator rit = range.rbegin(); rit != range.rend(); ++rit) {
// tell AEntityFactory that this element is going away
temp_result = aEntityFactory->notify_delete_entity(*rit);
......@@ -2921,7 +2921,7 @@ ErrorCode Core::list_entities(const Range &temp_range) const
{
ErrorCode result = MB_SUCCESS, tmp_result;
for (Range::const_iterator rit = temp_range.begin(); rit != temp_range.end(); rit++) {
for (Range::const_iterator rit = temp_range.begin(); rit != temp_range.end(); ++rit) {
EntityType this_type = TYPE_FROM_HANDLE(*rit);
std::cout << CN::EntityTypeName(this_type) << " " << ID_FROM_HANDLE(*rit) << ":" << endl;
......@@ -2970,7 +2970,7 @@ ErrorCode Core::list_entity(const EntityHandle entity) const
// create_if_missing, so we know we won't change anything
result = (const_cast<Core*>(this))->get_adjacencies(&(entity), 1, dim, false, adj_vec);
if (MB_FAILURE == result) continue;
for (HandleVec::iterator adj_it = adj_vec.begin(); adj_it != adj_vec.end(); adj_it++) {
for (HandleVec::iterator adj_it = adj_vec.begin(); adj_it != adj_vec.end(); ++adj_it) {
if (adj_it != adj_vec.begin()) std::cout << ", ";
else std::cout << " ";
std::cout << CN::EntityTypeName(TYPE_FROM_HANDLE(*adj_it)) << " " << ID_FROM_HANDLE(*adj_it);
......@@ -3689,7 +3689,7 @@ void Core::print(const EntityHandle ms_handle, const char *prefix,
std::cout << " Parent sets: ";
if (temp.empty()) std::cout << "(none)" << std::endl;
else {
for (Range::iterator rit = temp.begin(); rit != temp.end(); rit++) {
for (Range::iterator rit = temp.begin(); rit != temp.end(); ++rit) {
if (rit != temp.begin()) std::cout << ", ";
std::cout << ID_FROM_HANDLE(*rit);
}
......@@ -3701,7 +3701,7 @@ void Core::print(const EntityHandle ms_handle, const char *prefix,
std::cout << " Child sets: ";
if (temp.empty()) std::cout << "(none)" << std::endl;
else {
for (Range::iterator rit = temp.begin(); rit != temp.end(); rit++) {
for (Range::iterator rit = temp.begin(); rit != temp.end(); ++rit) {
if (rit != temp.begin()) std::cout << ", ";
std::cout << ID_FROM_HANDLE(*rit);
}
......@@ -3720,7 +3720,7 @@ ErrorCode Core::print_entity_tags(std::string indent_prefix, const EntityHandle
indent_prefix += " ";
for (std::vector<Tag>::iterator vit = set_tags.begin();
vit != set_tags.end(); vit++) {
vit != set_tags.end(); ++vit) {
TagType this_type;
result = this->tag_get_type(*vit, this_type);
if (MB_SUCCESS != result || tp != this_type) continue;
......@@ -3788,7 +3788,7 @@ ErrorCode Core::check_adjacencies()
Range all_ents;
ErrorCode result = get_entities_by_handle(0, all_ents);MB_CHK_ERR(result);
for (Range::iterator rit = all_ents.begin(); rit != all_ents.end(); rit++) {
for (Range::iterator rit = all_ents.begin(); rit != all_ents.end(); ++rit) {
result = check_adjacencies(&(*rit), 1);MB_CHK_ERR(result);
}
......@@ -3834,7 +3834,7 @@ ErrorCode Core::check_adjacencies(const EntityHandle *ents, int num_ents)
}
// now check and reverse-evaluate them
for (Range::iterator rit = adjs.begin(); rit != adjs.end(); rit++) {
for (Range::iterator rit = adjs.begin(); rit != adjs.end(); ++rit) {
EntitySequence* seq = 0;
tmp_result = sequence_manager()->find(*rit, seq);
if(seq == 0 || tmp_result != MB_SUCCESS) {
......@@ -3929,7 +3929,7 @@ ErrorCode Core::remove_set_iterator(SetIterator *set_iter)
ErrorCode Core::get_set_iterators(EntityHandle meshset,
std::vector<SetIterator *> &set_iters)
{
for (std::vector<SetIterator*>::const_iterator vit = setIterators.begin(); vit != setIterators.end(); vit++)
for (std::vector<SetIterator*>::const_iterator vit = setIterators.begin(); vit != setIterators.end(); ++vit)
if ((*vit)->ent_set() == meshset) set_iters.push_back(*vit);
return MB_SUCCESS;
}
......@@ -3946,7 +3946,7 @@ void Core::estimated_memory_use_internal( const Range* ents,
type_memstorage* tag_storage,
type_memstorage* amortized_tag_storage )
{
// Figure out which values we need to calulate
// Figure out which values we need to calculate
type_memstorage i_entity_storage, ia_entity_storage,
i_adjacency_storage, ia_adjacency_storage,
i_tag_storage, ia_tag_storage;
......
......@@ -169,7 +169,7 @@ ErrorCode DualTool::construct_dual(EntityHandle *entities,
maxHexId = -1;
Range::iterator rit;
unsigned int i;
for (rit = regions.begin(), i = 0; rit != regions.end(); rit++, i++) {
for (rit = regions.begin(), i = 0; rit != regions.end(); ++rit, i++) {
if (gid_vec[i] > maxHexId && mbImpl->type_from_handle(*rit) == MBHEX)
maxHexId = gid_vec[i];
}
......@@ -235,7 +235,7 @@ ErrorCode DualTool::construct_dual_vertices(const Range &all_regions,
ErrorCode tmp_result = MB_SUCCESS;
ErrorCode result = MB_SUCCESS;
for (rit = all_regions.begin(); rit != all_regions.end(); rit++) {
for (rit = all_regions.begin(); rit != all_regions.end(); ++rit) {
if (tmp_result != MB_SUCCESS) result = tmp_result;
tmp_result = mbImpl->tag_get_data(dualEntity_tag(), &(*rit), 1, &dual_ent);
......@@ -327,7 +327,7 @@ ErrorCode DualTool::construct_dual_edges(const Range &all_faces,
ErrorCode tmp_result = MB_SUCCESS;
ErrorCode result = MB_SUCCESS;
for (rit = all_faces.begin(); rit != all_faces.end(); rit++) {
for (rit = all_faces.begin(); rit != all_faces.end(); ++rit) {
if (tmp_result != MB_SUCCESS) result = tmp_result;
tmp_result = mbImpl->tag_get_data(dualEntity_tag(), &(*rit), 1, &dual_ent);
......@@ -410,7 +410,7 @@ ErrorCode DualTool::construct_dual_faces(const Range &all_edges,
ErrorCode result = MB_SUCCESS;
Range equiv_edges;
#define TRC if (MB_SUCCESS != tmp_result) {result = tmp_result; continue;}
for (rit = all_edges.begin(); rit != all_edges.end(); rit++) {
for (rit = all_edges.begin(); rit != all_edges.end(); ++rit) {
tmp_result = mbIm