From Eric Wing, pedantic warning fixes

This commit is contained in:
Robert Osfield
2007-04-06 15:36:13 +00:00
parent 0909bd04e4
commit 6d7b5e7ebd
38 changed files with 60 additions and 43 deletions

View File

@@ -164,7 +164,7 @@ public:
{
NO_TRANSPARANCY_FIXING,
MAKE_OPAQUE_TEXTURE_STATESET_OPAQUE,
MAKE_ALL_STATESET_OPAQUE,
MAKE_ALL_STATESET_OPAQUE
};
FixTransparencyVisitor(FixTransparencyMode mode=MAKE_OPAQUE_TEXTURE_STATESET_OPAQUE):

View File

@@ -423,7 +423,7 @@ osg::Geometry* createDomeDistortionMesh(const osg::Vec3& origin, const osg::Vec3
}
return geometry;
};
}
void setDomeCorrection(osgViewer::Viewer& viewer, osg::ArgumentParser& arguments)
{
@@ -712,4 +712,4 @@ int main(int argc, char** argv)
return viewer.run();
}
;

View File

@@ -392,4 +392,4 @@ bool QualifiedTestPrinter::visit( TestCase* pTest )
//////////////////////////////////////////////////////////////////////////////
};
}

View File

@@ -135,6 +135,6 @@ private:
osg::ref_ptr<MatrixManipulator> _current;
};
};
}
#endif

View File

@@ -57,7 +57,7 @@ class OSGGA_EXPORT NodeTrackerManipulator : public MatrixManipulator
NODE_CENTER_AND_AZIM,
/** Tack the center of the node's bounding sphere, and the all rotations of the node.
*/
NODE_CENTER_AND_ROTATION,
NODE_CENTER_AND_ROTATION
};
void setTrackerMode(TrackerMode mode);
@@ -71,7 +71,7 @@ class OSGGA_EXPORT NodeTrackerManipulator : public MatrixManipulator
TRACKBALL,
/** Allow the elevation and azimuth angles to be adjust w.r.t the tracked orientation.
*/
ELEVATION_AZIM,
ELEVATION_AZIM
};
void setRotationMode(RotationMode mode);

View File

@@ -31,7 +31,7 @@ class OSGGA_EXPORT TerrainManipulator : public MatrixManipulator
enum RotationMode
{
ELEVATION_AZIM_ROLL,
ELEVATION_AZIM,
ELEVATION_AZIM
};
void setRotationMode(RotationMode mode);

View File

@@ -144,9 +144,18 @@ class OSGSHADOW_EXPORT OccluderGeometry : public osg::Drawable
{
if (edge.boundaryEdge()) return true;
float offset = 0.0f;
osg::Vec3 delta(lightpos-_vertices[edge._p1]);
float n1 = delta * _triangleNormals[edge._t1];
float n2 = delta * _triangleNormals[edge._t2];
delta.normalize();
float n1 = delta * _triangleNormals[edge._t1] + offset;
float n2 = delta * _triangleNormals[edge._t2] + offset;
float angle_offset = 0.0f;
n1 = cos(acosf(n1) + angle_offset);
n2 = cos(acosf(n2) + angle_offset);
if (n1==0.0f && n2==0.0f) return false;
@@ -157,8 +166,15 @@ class OSGSHADOW_EXPORT OccluderGeometry : public osg::Drawable
{
if (edge.boundaryEdge()) return true;
float n1 = lightdirection * _triangleNormals[edge._t1];
float n2 = lightdirection * _triangleNormals[edge._t2];
float offset = 0.0f;
float n1 = lightdirection * _triangleNormals[edge._t1] + offset;
float n2 = lightdirection * _triangleNormals[edge._t2] + offset;
float angle_offset = 0.0f;
n1 = cos(acosf(n1) + angle_offset);
n2 = cos(acosf(n2) + angle_offset);
if (n1==0.0f && n2==0.0f) return false;

View File

@@ -95,6 +95,6 @@ extern LIB3DSAPI Lib3dsBool lib3ds_atmosphere_read(Lib3dsAtmosphere *atmosphere,
extern LIB3DSAPI Lib3dsBool lib3ds_atmosphere_write(Lib3dsAtmosphere *atmosphere, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -75,7 +75,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_background_read(Lib3dsBackground *background,
extern LIB3DSAPI Lib3dsBool lib3ds_background_write(Lib3dsBackground *background, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -54,7 +54,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_camera_read(Lib3dsCamera *camera, FILE *f);
extern LIB3DSAPI Lib3dsBool lib3ds_camera_write(Lib3dsCamera *camera, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -281,7 +281,7 @@ extern LIB3DSAPI void lib3ds_chunk_unknown(Lib3dsWord chunk);
extern LIB3DSAPI void lib3ds_chunk_dump_info(const char *format, ...);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -257,7 +257,7 @@ static Lib3dsChunkTable lib3ds_chunk_table[]={
};
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -35,7 +35,7 @@ extern LIB3DSAPI Lib3dsFloat lib3ds_ease(Lib3dsFloat fp, Lib3dsFloat fc,
Lib3dsFloat fn, Lib3dsFloat ease_from, Lib3dsFloat ease_to);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -99,7 +99,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_file_remove_node(Lib3dsFile *file, Lib3dsNode
extern LIB3DSAPI void lib3ds_file_dump_nodes(Lib3dsFile *file);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -35,7 +35,7 @@ extern LIB3DSAPI Lib3dsFloat lib3ds_float_cubic(Lib3dsFloat a, Lib3dsFloat p,
Lib3dsFloat q, Lib3dsFloat b, Lib3dsFloat t);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -72,7 +72,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_light_read(Lib3dsLight *light, FILE *f);
extern LIB3DSAPI Lib3dsBool lib3ds_light_write(Lib3dsLight *light, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -160,7 +160,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_material_read(Lib3dsMaterial *material, FILE
extern LIB3DSAPI Lib3dsBool lib3ds_material_write(Lib3dsMaterial *material, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -61,7 +61,7 @@ extern LIB3DSAPI void lib3ds_matrix_camera(Lib3dsMatrix matrix, Lib3dsVector pos
extern LIB3DSAPI void lib3ds_matrix_dump(Lib3dsMatrix matrix);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -129,7 +129,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_mesh_read(Lib3dsMesh *mesh, FILE *f);
extern LIB3DSAPI Lib3dsBool lib3ds_mesh_write(Lib3dsMesh *mesh, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -163,7 +163,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_node_read(Lib3dsNode *node, Lib3dsFile *file,
extern LIB3DSAPI Lib3dsBool lib3ds_node_write(Lib3dsNode *node, Lib3dsFile *file, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -55,7 +55,7 @@ extern LIB3DSAPI void lib3ds_quat_tangent(Lib3dsQuat c, Lib3dsQuat p, Lib3dsQuat
extern LIB3DSAPI void lib3ds_quat_dump(Lib3dsQuat q);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -55,7 +55,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_rgb_write(Lib3dsRgb rgb, FILE *f);
extern LIB3DSAPI Lib3dsBool lib3ds_string_write(const char *s, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -49,7 +49,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_shadow_read(Lib3dsShadow *shadow, FILE *f);
extern LIB3DSAPI Lib3dsBool lib3ds_shadow_write(Lib3dsShadow *shadow, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -56,7 +56,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_tcb_read(Lib3dsTcb *tcb, FILE *f);
extern LIB3DSAPI Lib3dsBool lib3ds_tcb_write(Lib3dsTcb *tcb, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -203,7 +203,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_morph_track_read(Lib3dsMorphTrack *track, FIL
extern LIB3DSAPI Lib3dsBool lib3ds_morph_track_write(Lib3dsMorphTrack *track, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -134,7 +134,7 @@ typedef union _Lib3dsUserData {
} Lib3dsUserData;
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -52,7 +52,7 @@ extern LIB3DSAPI void lib3ds_vector_max(Lib3dsVector c, Lib3dsVector a);
extern LIB3DSAPI void lib3ds_vector_dump(Lib3dsVector c);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -127,7 +127,7 @@ extern LIB3DSAPI void lib3ds_viewport_set_views(Lib3dsViewport *viewport, Lib3ds
extern LIB3DSAPI Lib3dsBool lib3ds_viewport_write(Lib3dsViewport *viewport, FILE *f);
#ifdef __cplusplus
};
}
#endif
#endif

View File

@@ -186,7 +186,7 @@ enum {
SurfaceTypeLineStrip = 2,
SurfaceShaded = 1<<4,
SurfaceTwoSided = 1<<5,
SurfaceTwoSided = 1<<5
};
/// Returns a possibly quoted string given in the end of the current line in the stream

View File

@@ -61,7 +61,7 @@ geoHeaderGeo::geoHeaderGeo()
extVars=new userVars;
_initialTick = _timer.tick();
color_palette=new colourPalette;
};
}
const geoValue *geoHeaderGeo::getGeoVar(const unsigned fid) const {
const geoValue *st=intVars->getGeoVar(fid);
if (!st) {

View File

@@ -165,10 +165,10 @@ class sockbuf: public streambuf
enum msgflag {
msg_oob = MSG_OOB,
msg_peek = MSG_PEEK,
msg_dontroute = MSG_DONTROUTE,
msg_dontroute = MSG_DONTROUTE
#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__))
msg_maxiovlen = MSG_MAXIOVLEN
,msg_maxiovlen = MSG_MAXIOVLEN
#endif
};
enum shuthow {

View File

@@ -239,4 +239,4 @@ namespace DX {
}
}
};
}

View File

@@ -15,7 +15,7 @@ ColorRange::ColorRange(float min, float max): ScalarsToColors(min,max)
ColorRange::ColorRange(float min, float max, const std::vector<osg::Vec4>& colors): ScalarsToColors(min,max)
{
setColors(colors);
};
}
void ColorRange::setColors(const std::vector<osg::Vec4>& colors)
{

View File

@@ -327,6 +327,8 @@ void GeometryTechnique::init()
}
}
// _geometry->setUseDisplayList(false);
_dirty = false;
}

View File

@@ -1,4 +1,3 @@
;
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under

View File

@@ -31,7 +31,7 @@ using namespace osgUtil;
Statistics::Statistics()
{
reset();
};
}
void Statistics::reset()
{

View File

@@ -379,6 +379,6 @@ inline bool _cmp_tri_degree_gt::operator () (const triangle_degree & a, const tr
}; // namespace triangle_stripper
} // namespace triangle_stripper
#endif

View File

@@ -891,7 +891,7 @@ bool GraphicsWindowCarbon::handleMouseEvent(EventRef theEvent)
enum
{
kEventParamMouseWheelSmoothVerticalDelta = 'saxy', // typeSInt32
kEventParamMouseWheelSmoothHorizontalDelta = 'saxx', // typeSInt32
kEventParamMouseWheelSmoothHorizontalDelta = 'saxx' // typeSInt32
};
SInt32 scroll_delta_x = 0;