]> git.mxchange.org Git - simgear.git/commitdiff
Vassilii Khachaturov:
authorehofman <ehofman>
Mon, 19 Dec 2005 12:52:02 +0000 (12:52 +0000)
committerehofman <ehofman>
Mon, 19 Dec 2005 12:52:02 +0000 (12:52 +0000)
clean up some build warnings caught with gcc-4.0.

simgear/environment/visual_enviro.cxx
simgear/io/sg_binobj.cxx

index e4649cf67cf9faffad7ee02ec5c6ade4e14619ad..8daab27c86318cd33523fcfedf73296a5d76c995 100644 (file)
@@ -419,7 +419,8 @@ void SGEnviro::drawRain(double pitch, double roll, double heading, double speed,
        glDisable( GL_FOG );
        glDisable(GL_LIGHTING);
 
-       int slice_count = (40.0 + rain_norm*150.0)* precipitation_density / 100.0;
+       int slice_count = static_cast<int>(
+                               (40.0 + rain_norm*150.0)* precipitation_density / 100.0);
 
        float angle = speed;
        if( angle > 90.0 )
@@ -500,7 +501,7 @@ void SGLightning::lt_build_tree_branch(int tree_nr, Point3D &start, float energy
         nseg++;
                // add a branch
         if( energy * sg_random() > 0.8f )
-                       lt_build_tree_branch(tree_nr + 1, pt, energy * 0.9f, nbseg == 50 ? 10 : nbseg * 0.4f, segsize * 0.7f);
+                       lt_build_tree_branch(tree_nr + 1, pt, energy * 0.9f, nbseg == 50 ? 10 : static_cast<int>(nbseg * 0.4f), segsize * 0.7f);
 
                if( nb_tree >= MAX_LT_TREE_SEG )
                        return;
index dc951830fcaec958f3da10bb1e4edb6c84313593..42536a078f924370e53c0c65abb2606dd8104220 100644 (file)
@@ -45,7 +45,7 @@ SG_USING_STD( string );
 SG_USING_STD( vector );
 
 
-enum {
+static enum {
     SG_BOUNDING_SPHERE = 0,
 
     SG_VERTEX_LIST = 1,
@@ -60,14 +60,14 @@ enum {
     SG_TRIANGLE_FANS = 12
 } sgObjectTypes;
 
-enum {
+static enum {
     SG_IDX_VERTICES =  0x01,
     SG_IDX_NORMALS =   0x02,
     SG_IDX_COLORS =    0x04,
     SG_IDX_TEXCOORDS = 0x08
 } sgIndexTypes;
 
-enum {
+static enum {
     SG_MATERIAL = 0,
     SG_INDEX_TYPES = 1
 } sgPropertyTypes;