Vassilii Khachaturov:
clean up some build warnings caught with gcc-4.0.
This commit is contained in:
@@ -419,7 +419,8 @@ void SGEnviro::drawRain(double pitch, double roll, double heading, double speed,
|
|||||||
glDisable( GL_FOG );
|
glDisable( GL_FOG );
|
||||||
glDisable(GL_LIGHTING);
|
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;
|
float angle = speed;
|
||||||
if( angle > 90.0 )
|
if( angle > 90.0 )
|
||||||
@@ -500,7 +501,7 @@ void SGLightning::lt_build_tree_branch(int tree_nr, Point3D &start, float energy
|
|||||||
nseg++;
|
nseg++;
|
||||||
// add a branch
|
// add a branch
|
||||||
if( energy * sg_random() > 0.8f )
|
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 )
|
if( nb_tree >= MAX_LT_TREE_SEG )
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ SG_USING_STD( string );
|
|||||||
SG_USING_STD( vector );
|
SG_USING_STD( vector );
|
||||||
|
|
||||||
|
|
||||||
enum {
|
static enum {
|
||||||
SG_BOUNDING_SPHERE = 0,
|
SG_BOUNDING_SPHERE = 0,
|
||||||
|
|
||||||
SG_VERTEX_LIST = 1,
|
SG_VERTEX_LIST = 1,
|
||||||
@@ -60,14 +60,14 @@ enum {
|
|||||||
SG_TRIANGLE_FANS = 12
|
SG_TRIANGLE_FANS = 12
|
||||||
} sgObjectTypes;
|
} sgObjectTypes;
|
||||||
|
|
||||||
enum {
|
static enum {
|
||||||
SG_IDX_VERTICES = 0x01,
|
SG_IDX_VERTICES = 0x01,
|
||||||
SG_IDX_NORMALS = 0x02,
|
SG_IDX_NORMALS = 0x02,
|
||||||
SG_IDX_COLORS = 0x04,
|
SG_IDX_COLORS = 0x04,
|
||||||
SG_IDX_TEXCOORDS = 0x08
|
SG_IDX_TEXCOORDS = 0x08
|
||||||
} sgIndexTypes;
|
} sgIndexTypes;
|
||||||
|
|
||||||
enum {
|
static enum {
|
||||||
SG_MATERIAL = 0,
|
SG_MATERIAL = 0,
|
||||||
SG_INDEX_TYPES = 1
|
SG_INDEX_TYPES = 1
|
||||||
} sgPropertyTypes;
|
} sgPropertyTypes;
|
||||||
|
|||||||
Reference in New Issue
Block a user