From 99bc4e9a873d2f452943498948ecdd81e0d6d19c Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 19 Dec 2005 12:52:02 +0000 Subject: [PATCH] Vassilii Khachaturov: clean up some build warnings caught with gcc-4.0. --- simgear/environment/visual_enviro.cxx | 5 +++-- simgear/io/sg_binobj.cxx | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/simgear/environment/visual_enviro.cxx b/simgear/environment/visual_enviro.cxx index e4649cf6..8daab27c 100644 --- a/simgear/environment/visual_enviro.cxx +++ b/simgear/environment/visual_enviro.cxx @@ -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( + (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(nbseg * 0.4f), segsize * 0.7f); if( nb_tree >= MAX_LT_TREE_SEG ) return; diff --git a/simgear/io/sg_binobj.cxx b/simgear/io/sg_binobj.cxx index dc951830..42536a07 100644 --- a/simgear/io/sg_binobj.cxx +++ b/simgear/io/sg_binobj.cxx @@ -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; -- 2.39.5