]> git.mxchange.org Git - flightgear.git/commitdiff
Tweaks to loop constructs with STL usage.
authorcurt <curt>
Wed, 9 Sep 1998 20:58:09 +0000 (20:58 +0000)
committercurt <curt>
Wed, 9 Sep 1998 20:58:09 +0000 (20:58 +0000)
Scenery/tilemgr.cxx
Scenery/tilemgr.hxx

index 3cb010d581f8d5196b61f399cb7feb4a73c12ea2..40ca1bed73b0a1f9d0c4158ddb89f8febe4e05f9 100644 (file)
@@ -484,9 +484,8 @@ double fgTileMgrCurElev( double lon, double lat, fgPoint3d *abs_view_pos ) {
        current = t->fragment_list.begin();
        last = t->fragment_list.end();
 
-       while ( current != last ) {
+       for ( ; current != last; ++current ) {
            frag_ptr = &(*current);
-           current++;
            /* printf("distance squared = %.2f, bounding radius = %.2f\n", 
               point_line_dist_squared( &(frag_ptr->center), 
               &abs_view_pos), local_up),
@@ -644,9 +643,8 @@ void fgTileMgrRender( void ) {
            current = t->fragment_list.begin();
            last = t->fragment_list.end();
 
-           while ( current != last ) {
+           for ( ; current != last; ++current ) {
                frag_ptr = &(*current);
-               current++;
                
                if ( frag_ptr->display_list >= 0 ) {
                    // Fine (fragment based) culling
@@ -714,7 +712,7 @@ void fgTileMgrRender( void ) {
 
     xglPushMatrix();
 
-    while ( mapcurrent != maplast ) {
+    for ( ; mapcurrent != maplast; ++mapcurrent ) {
         // (char *)key = (*mapcurrent).first;
         // (fgMATERIAL)value = (*mapcurrent).second;
        mtl_ptr = &(*mapcurrent).second;
@@ -761,8 +759,6 @@ void fgTileMgrRender( void ) {
                last_tile_ptr = frag_ptr->tile_ptr;
            }
        }
-
-        *mapcurrent++;
     }
 
     xglPopMatrix();
@@ -775,6 +771,9 @@ void fgTileMgrRender( void ) {
 
 
 // $Log$
+// Revision 1.34  1998/09/09 20:58:09  curt
+// Tweaks to loop constructs with STL usage.
+//
 // Revision 1.33  1998/09/08 15:05:10  curt
 // Optimization by Norman Vine.
 //
index e927874513100b5768207ce342510035fe69fafc..62efaf414db9d9b1a1cf4e6aa61d90845935e5f3 100644 (file)
@@ -55,7 +55,10 @@ void fgTileMgrRender( void );
 
 
 // $Log$
-// Revision 1.3  1998/08/22 14:49:59  curt
+// Revision 1.4  1998/09/09 20:58:11  curt
+// Tweaks to loop constructs with STL usage.
+//
+// Revision 1.3  1998/08/22  14:49:59  curt
 // Attempting to iron out seg faults and crashes.
 // Did some shuffling to fix a initialization order problem between view
 // position, scenery elevation.