Fixed warnings

This commit is contained in:
Robert Osfield
2008-12-18 11:06:57 +00:00
parent 1cd6541bfd
commit 4ad20a413a
14 changed files with 64 additions and 47 deletions

View File

@@ -318,17 +318,16 @@ class OSG_EXPORT Image : public Object
/** Get the const PixelBufferObject.*/
const PixelBufferObject* getPixelBufferObject() const { return _bufferObject.get(); }
virtual void update(NodeVisitor* nv) {}
virtual void update(NodeVisitor* /*nv*/) {}
/** method for sending pointer events to images that are acting as front ends to interactive surfaces such as a vnc or browser window. Return true if handled. */
virtual bool sendPointerEvent(int x, int y, int buttonMask) { return false; }
virtual bool sendPointerEvent(int /*x*/, int /*y*/, int /*buttonMask*/) { return false; }
/** method for sending key events to images that are acting as front ends to interactive surfaces such as a vnc or browser window. Return true if handled.*/
virtual bool sendKeyEvent(int key, bool keyDown) { return false; }
virtual bool sendKeyEvent(int /*key*/, bool /*keyDown*/) { return false; }
/** method for passing frame information to the custom Image classes, to be called only when objects associated with imagery are not culled.*/
virtual void setFrameLastRendered(const osg::FrameStamp* frameStamp) {}
virtual void setFrameLastRendered(const osg::FrameStamp* /*frameStamp*/) {}
protected :

View File

@@ -169,7 +169,7 @@ namespace osgAnimation {
enum TimeBehaviour
{
CLAMP,
LOOP,
LOOP
};
Motion(float startValue = 0, float duration = 1, float changeValue = 1, TimeBehaviour tb = CLAMP) : _time(0), _startValue(startValue), _changeValue(changeValue), _duration(duration), _behaviour(tb) {}
virtual ~Motion() {}

View File

@@ -646,11 +646,11 @@ void DataOutputStream::writePackedFloatArray(const osg::FloatArray* a, float max
if (maxError>0.0f)
{
float byteError = 0.0f;
//float byteError = 0.0f;
float byteMultiplier = 255.0f/(maxValue-minValue);
float byteInvMultiplier = 1.0f/byteMultiplier;
float shortError = 0.0f;
//float shortError = 0.0f;
float shortMultiplier = 65535.0f/(maxValue-minValue);
float shortInvMultiplier = 1.0f/shortMultiplier;

View File

@@ -7,7 +7,8 @@
#include <osgDB/FileUtils>
#include <osgWidget/Box>
bool osgWidget_Box_readData(osg::Object& obj, osgDB::Input& fr) {
bool osgWidget_Box_readData(osg::Object& /*obj*/, osgDB::Input& fr)
{
/*
osgWidget::Box& box = static_cast<osgWidgegt::Box&>(obj);
@@ -45,8 +46,9 @@ bool osgWidget_Box_readData(osg::Object& obj, osgDB::Input& fr) {
return false;
}
bool osgWidget_Box_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::Box& model = static_cast<const osgWidget::Box&>(obj);
bool osgWidget_Box_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::Box& model = static_cast<const osgWidget::Box&>(obj);
fw.indent() << fw.wrapString("Box stuff...") << std::endl;

View File

@@ -7,16 +7,16 @@
#include <osgDB/FileUtils>
#include <osgWidget/Window>
bool osgWidget_EmbeddedWindow_readData(osg::Object& obj, osgDB::Input& fr) {
bool osgWidget_EmbeddedWindow_readData(osg::Object& /*obj*/, osgDB::Input& fr)
{
osgWidget::warn() << "EmbeddedWindow read" << std::endl;
return false;
}
bool osgWidget_EmbeddedWindow_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::Window::EmbeddedWindow& model =
static_cast<const osgWidget::Window::EmbeddedWindow&>(obj)
;
bool osgWidget_EmbeddedWindow_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::Window::EmbeddedWindow& model = static_cast<const osgWidget::Window::EmbeddedWindow&>(obj);
fw.indent() << fw.wrapString("EmbeddedWindow stuff...") << std::endl;

View File

@@ -7,14 +7,16 @@
#include <osgDB/FileUtils>
#include <osgWidget/Frame>
bool osgWidget_Frame_readData(osg::Object& obj, osgDB::Input& fr) {
bool osgWidget_Frame_readData(osg::Object& /*obj*/, osgDB::Input& fr)
{
osgWidget::warn() << "Frame read" << std::endl;
return false;
}
bool osgWidget_Frame_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::Frame& model = static_cast<const osgWidget::Frame&>(obj);
bool osgWidget_Frame_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::Frame& model = static_cast<const osgWidget::Frame&>(obj);
fw.indent() << fw.wrapString("Frame stuff...") << std::endl;

View File

@@ -7,14 +7,16 @@
#include <osgDB/FileUtils>
#include <osgWidget/Input>
bool osgWidget_Input_readData(osg::Object& obj, osgDB::Input& fr) {
bool osgWidget_Input_readData(osg::Object& /*obj*/, osgDB::Input& fr)
{
osgWidget::warn() << "Input read" << std::endl;
return false;
}
bool osgWidget_Input_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::Input& model = static_cast<const osgWidget::Input&>(obj);
bool osgWidget_Input_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::Input& model = static_cast<const osgWidget::Input&>(obj);
fw.indent() << fw.wrapString("Input stuff...") << std::endl;

View File

@@ -7,14 +7,16 @@
#include <osgDB/FileUtils>
#include <osgWidget/Label>
bool osgWidget_Label_readData(osg::Object& obj, osgDB::Input& fr) {
bool osgWidget_Label_readData(osg::Object& /*obj*/, osgDB::Input& fr)
{
osgWidget::warn() << "Label read" << std::endl;
return false;
}
bool osgWidget_Label_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::Label& model = static_cast<const osgWidget::Label&>(obj);
bool osgWidget_Label_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::Label& model = static_cast<const osgWidget::Label&>(obj);
fw.indent() << fw.wrapString("Label stuff...") << std::endl;

View File

@@ -7,14 +7,15 @@
#include <osgDB/FileUtils>
#include <osgWidget/Table>
bool osgWidget_Table_readData(osg::Object& obj, osgDB::Input& fr) {
bool osgWidget_Table_readData(osg::Object& /*obj*/, osgDB::Input& fr) {
osgWidget::warn() << "Table read" << std::endl;
return false;
}
bool osgWidget_Table_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::Table& model = static_cast<const osgWidget::Table&>(obj);
bool osgWidget_Table_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::Table& model = static_cast<const osgWidget::Table&>(obj);
fw.indent() << fw.wrapString("Table stuff...") << std::endl;

View File

@@ -14,36 +14,42 @@ bool osgWidget_Widget_readData(osg::Object& obj, osgDB::Input& fr) {
return false;
}
bool osgWidget_Widget_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::Widget& model = static_cast<const osgWidget::Widget&>(obj);
bool osgWidget_Widget_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::Widget& model = static_cast<const osgWidget::Widget&>(obj);
fw.indent() << fw.wrapString("Widget stuff...") << std::endl;
return true;
}
bool osgWidget_NotifyWidget_readData(osg::Object& obj, osgDB::Input& fr) {
bool osgWidget_NotifyWidget_readData(osg::Object& /*obj*/, osgDB::Input& fr)
{
osgWidget::warn() << "NotifyWidget read" << std::endl;
return false;
}
bool osgWidget_NotifyWidget_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::NotifyWidget& model = static_cast<const osgWidget::NotifyWidget&>(obj);
bool osgWidget_NotifyWidget_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::NotifyWidget& model = static_cast<const osgWidget::NotifyWidget&>(obj);
fw.indent() << fw.wrapString("NotifyWidget stuff...") << std::endl;
return true;
}
bool osgWidget_NullWidget_readData(osg::Object& obj, osgDB::Input& fr) {
bool osgWidget_NullWidget_readData(osg::Object& /*obj*/, osgDB::Input& fr)
{
osgWidget::warn() << "NullWidget read" << std::endl;
return false;
}
bool osgWidget_NullWidget_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::NullWidget& model = static_cast<const osgWidget::NullWidget&>(obj);
bool osgWidget_NullWidget_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::NullWidget& model = static_cast<const osgWidget::NullWidget&>(obj);
fw.indent() << fw.wrapString("NullWidget stuff...") << std::endl;

View File

@@ -7,14 +7,16 @@
#include <osgDB/FileUtils>
#include <osgWidget/WindowManager>
bool osgWidget_WindowManager_readData(osg::Object& obj, osgDB::Input& fr) {
bool osgWidget_WindowManager_readData(osg::Object& /*obj*/, osgDB::Input& fr)
{
osgWidget::warn() << "WindowManager read" << std::endl;
return false;
}
bool osgWidget_WindowManager_writeData(const osg::Object& obj, osgDB::Output& fw) {
const osgWidget::WindowManager& model = static_cast<const osgWidget::WindowManager&>(obj);
bool osgWidget_WindowManager_writeData(const osg::Object& /*obj*/, osgDB::Output& fw)
{
// const osgWidget::WindowManager& model = static_cast<const osgWidget::WindowManager&>(obj);
fw.indent() << fw.wrapString("WindowManager stuff...") << std::endl;

View File

@@ -283,7 +283,7 @@ void GeometryTechnique::generateGeometry(Locator* masterLocator, const osg::Vec3
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
float minHeight = 0.0;
//float minHeight = 0.0;
float scaleHeight = _terrainTile->getTerrain() ? _terrainTile->getTerrain()->getVerticalScale() : 1.0f;
// allocate and assign tex coords
@@ -311,7 +311,7 @@ void GeometryTechnique::generateGeometry(Locator* masterLocator, const osg::Vec3
if (switchLayer)
{
if (switchLayer->getActiveLayer()>=0 &&
switchLayer->getActiveLayer()<switchLayer->getNumLayers() &&
static_cast<unsigned int>(switchLayer->getActiveLayer())<switchLayer->getNumLayers() &&
switchLayer->getLayer(switchLayer->getActiveLayer()))
{
locator = switchLayer->getLayer(switchLayer->getActiveLayer())->getLocator();
@@ -697,7 +697,8 @@ void GeometryTechnique::applyColorLayers()
osgTerrain::SwitchLayer* switchLayer = dynamic_cast<osgTerrain::SwitchLayer*>(colorLayer);
if (switchLayer)
{
if (switchLayer->getActiveLayer()<0 || switchLayer->getActiveLayer()>=switchLayer->getNumLayers())
if (switchLayer->getActiveLayer()<0 ||
static_cast<unsigned int>(switchLayer->getActiveLayer())>=switchLayer->getNumLayers())
{
continue;
}

View File

@@ -33,9 +33,9 @@ Locator::Locator():
Locator::Locator(const Locator& locator,const osg::CopyOp& copyop):
osg::Object(locator,copyop),
_coordinateSystemType(locator._coordinateSystemType),
_ellipsoidModel(locator._ellipsoidModel),
_format(locator._format),
_cs(locator._cs),
_ellipsoidModel(locator._ellipsoidModel),
_transform(locator._transform),
_definedInFile(locator._definedInFile),
_transformScaledByResolution(locator._transformScaledByResolution)

View File

@@ -40,10 +40,10 @@ osg::ref_ptr<TerrainTile::TileLoadedCallback>& TerrainTile::getTileLoadedCallbac
TerrainTile::TerrainTile():
_terrain(0),
_dirty(false),
_hasBeenTraversal(false),
_requiresNormals(true),
_treatBoundariesToValidDataAsDefaultValue(false),
_dirty(false)
_treatBoundariesToValidDataAsDefaultValue(false)
{
setThreadSafeRefUnref(true);
}
@@ -51,12 +51,12 @@ TerrainTile::TerrainTile():
TerrainTile::TerrainTile(const TerrainTile& terrain,const osg::CopyOp& copyop):
Group(terrain,copyop),
_terrain(0),
_dirty(false),
_hasBeenTraversal(false),
_elevationLayer(terrain._elevationLayer),
_colorLayers(terrain._colorLayers),
_requiresNormals(terrain._requiresNormals),
_treatBoundariesToValidDataAsDefaultValue(terrain._treatBoundariesToValidDataAsDefaultValue),
_dirty(false)
_treatBoundariesToValidDataAsDefaultValue(terrain._treatBoundariesToValidDataAsDefaultValue)
{
if (terrain.getTerrainTechnique())
{