Fixed warnings
This commit is contained in:
@@ -311,7 +311,8 @@ osg::MatrixTransform* setupAnimtkNode(osg::Geode* staticGeode)
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
osgViewer::Viewer viewer;
|
||||
osg::ArgumentParser arguments(&argc, argv);
|
||||
osgViewer::Viewer viewer(arguments);
|
||||
|
||||
osgGA::TrackballManipulator* tbm = new osgGA::TrackballManipulator();
|
||||
|
||||
|
||||
@@ -249,7 +249,9 @@ osg::MatrixTransform* setupAnimtkNode()
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
osgViewer::Viewer viewer;
|
||||
osg::ArgumentParser arguments(&argc, argv);
|
||||
osgViewer::Viewer viewer(arguments);
|
||||
|
||||
osgGA::TrackballManipulator* manipulator = new osgGA::TrackballManipulator();
|
||||
viewer.setCameraManipulator(manipulator);
|
||||
|
||||
|
||||
@@ -156,7 +156,9 @@ void initVertexMap(osgAnimation::Bone* b0,
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
osgViewer::Viewer viewer;
|
||||
osg::ArgumentParser arguments(&argc, argv);
|
||||
osgViewer::Viewer viewer(arguments);
|
||||
|
||||
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
|
||||
|
||||
osg::ref_ptr<osgAnimation::Skeleton> skelroot = new osgAnimation::Skeleton;
|
||||
|
||||
@@ -60,7 +60,9 @@ osg::ref_ptr<osg::Geode> createAxis()
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
osgViewer::Viewer viewer;
|
||||
osg::ArgumentParser arguments(&argc, argv);
|
||||
osgViewer::Viewer viewer(arguments);
|
||||
|
||||
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
|
||||
|
||||
osg::Group* root = new osg::Group;
|
||||
|
||||
@@ -109,7 +109,7 @@ struct ExampleTimelineUsage : public osgGA::GUIEventHandler
|
||||
_scratchNose->setCallback(_scratchNose->getNumFrames()-1, new NoseEnd);
|
||||
}
|
||||
|
||||
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)
|
||||
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&)
|
||||
{
|
||||
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYUP)
|
||||
{
|
||||
|
||||
@@ -44,13 +44,13 @@ struct ButtonFunctor: public WidgetSampler
|
||||
|
||||
ButtonFunctor(): _speed(5) { _direction = -_speed; _previous = 0;}
|
||||
|
||||
bool enter(osgWidget::Event& ev)
|
||||
bool enter(osgWidget::Event&)
|
||||
{
|
||||
_direction = _speed;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool leave(osgWidget::Event& ev)
|
||||
bool leave(osgWidget::Event&)
|
||||
{
|
||||
_direction = -_speed;
|
||||
return true;
|
||||
|
||||
@@ -42,7 +42,7 @@ void AnimtkKeyEventHandler::printUsage() const
|
||||
}
|
||||
|
||||
|
||||
bool AnimtkKeyEventHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa,
|
||||
bool AnimtkKeyEventHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&,
|
||||
osg::Object*, osg::NodeVisitor*)
|
||||
{
|
||||
AnimtkViewerModelController& mc = AnimtkViewerModelController::instance();
|
||||
|
||||
@@ -119,7 +119,9 @@ createStateSet()
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
// Make a scene graph consisting of a single Geode, containing
|
||||
osg::ArgumentParser arguments(&argc, argv);
|
||||
|
||||
// Make a scene graph consisting of a single Geode, containing
|
||||
// a single Geometry, and a single PrimitiveSet.
|
||||
osg::ref_ptr< osg::Geode > geode = new osg::Geode;
|
||||
|
||||
@@ -142,7 +144,7 @@ int main( int argc, char **argv )
|
||||
|
||||
// osgDB::writeNodeFile(*geode, "instanced.osg");
|
||||
|
||||
osgViewer::Viewer viewer;
|
||||
osgViewer::Viewer viewer(arguments);
|
||||
viewer.setSceneData( geode.get() );
|
||||
return viewer.run();
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
int main( int , char * )
|
||||
{
|
||||
osg::Geode* root( new osg::Geode );
|
||||
root->addDrawable( new SomePoints );
|
||||
|
||||
@@ -236,7 +236,7 @@ struct SnapeImageHandler : public osgGA::GUIEventHandler
|
||||
_key(key),
|
||||
_snapImage(si) {}
|
||||
|
||||
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)
|
||||
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&)
|
||||
{
|
||||
if (ea.getHandled()) return false;
|
||||
|
||||
|
||||
@@ -315,7 +315,6 @@ bool MovieEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void MovieEventHandler::getUsage(osg::ApplicationUsage& usage) const
|
||||
|
||||
@@ -86,7 +86,6 @@ class ContextTest : public MemoryTest
|
||||
if (_pbuffer) throw "Failed to create PixelBuffer";
|
||||
else throw "Failed to create GraphicsWindow";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +169,6 @@ class TextureTest : public GLMemoryTest
|
||||
{
|
||||
throw "Invalid texture size of 0,0,0";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
osgDB::Input fr;
|
||||
fr.attach(&fin);
|
||||
|
||||
bool readFilename;
|
||||
bool readFilename = false;
|
||||
|
||||
while(!fr.eof())
|
||||
{
|
||||
|
||||
@@ -479,6 +479,8 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
TestRunner& operator = (const TestRunner&) { return *this; }
|
||||
|
||||
TestReport _db; // Results
|
||||
TestContext& _ctx; // The Global Testing Context
|
||||
std::vector<std::string> _tests; // Specified Tests
|
||||
|
||||
@@ -437,8 +437,7 @@ int Thread::testCancel()
|
||||
// ExitThread(0);
|
||||
throw Win32ThreadCanceled();
|
||||
|
||||
return 0;
|
||||
|
||||
// return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -92,6 +92,8 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
dxtc_pixels& operator = (const dxtc_pixels&) { return *this; }
|
||||
|
||||
// Limitation check functions
|
||||
inline bool DXT1() const;
|
||||
inline bool DXT3() const;
|
||||
|
||||
@@ -154,5 +154,4 @@ DynamicLibrary::PROC_ADDRESS DynamicLibrary::getProcAddress(const std::string& p
|
||||
}
|
||||
return sym;
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -695,9 +695,9 @@ static void appendInstallationLibraryFilePaths(osgDB::FilePathList& filepath)
|
||||
// path specified by the App Paths registry key.
|
||||
filenamechar* ptr;
|
||||
#ifdef OSG_USE_UTF8_FILENAME
|
||||
if (ptr = _wgetenv(OSGDB_FILENAME_TEXT("PATH")))
|
||||
if ((ptr = _wgetenv(OSGDB_FILENAME_TEXT("PATH"))))
|
||||
#else
|
||||
if (ptr = getenv("PATH"))
|
||||
if ((ptr = getenv("PATH")))
|
||||
#endif
|
||||
{
|
||||
// Note that on any sane Windows system, some of the paths above
|
||||
|
||||
@@ -67,7 +67,6 @@ bool CameraViewSwitchManipulator::handle(const GUIEventAdapter& ea,GUIActionAdap
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
osg::Matrixd CameraViewSwitchManipulator::getMatrix() const
|
||||
|
||||
@@ -172,7 +172,6 @@ bool TrackballManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -252,8 +252,6 @@ bool UFOManipulator::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAda
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void UFOManipulator::getUsage(osg::ApplicationUsage& usage) const
|
||||
|
||||
@@ -146,7 +146,6 @@ bool RotateCylinderDragger::handle(const PointerInfo& pointer, const osgGA::GUIE
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void RotateCylinderDragger::setupDefaultGeometry()
|
||||
|
||||
@@ -148,7 +148,6 @@ bool RotateSphereDragger::handle(const PointerInfo& pointer, const osgGA::GUIEve
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void RotateSphereDragger::setupDefaultGeometry()
|
||||
|
||||
@@ -159,7 +159,6 @@ bool Scale1DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Scale1DDragger::setupDefaultGeometry()
|
||||
|
||||
@@ -182,7 +182,6 @@ bool Scale2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Scale2DDragger::setupDefaultGeometry()
|
||||
|
||||
@@ -138,7 +138,6 @@ bool Translate1DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Translate1DDragger::setupDefaultGeometry()
|
||||
|
||||
@@ -137,7 +137,6 @@ bool Translate2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Translate2DDragger::setupDefaultGeometry()
|
||||
|
||||
@@ -238,6 +238,11 @@ struct IdHelper
|
||||
flt::FltExportVisitor& v_;
|
||||
const std::string id_;
|
||||
DataOutputStream* dos_;
|
||||
|
||||
protected:
|
||||
|
||||
IdHelper& operator = (const IdHelper&) { return *this; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -262,6 +267,10 @@ struct SubfaceHelper
|
||||
|
||||
flt::FltExportVisitor& v_;
|
||||
bool _polygonOffsetOn;
|
||||
|
||||
protected:
|
||||
|
||||
SubfaceHelper& operator = (const SubfaceHelper&) { return *this; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -66,6 +66,10 @@ class LightSourcePaletteManager
|
||||
|
||||
|
||||
ExportOptions& _fltOpt;
|
||||
|
||||
protected:
|
||||
|
||||
LightSourcePaletteManager& operator = (const LightSourcePaletteManager&) { return *this; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,10 @@ class MaterialPaletteManager
|
||||
MaterialPalette _materialPalette;
|
||||
|
||||
ExportOptions& _fltOpt;
|
||||
|
||||
protected:
|
||||
|
||||
MaterialPaletteManager& operator = (const MaterialPaletteManager&) { return *this; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
TexturePaletteManager& operator = (const TexturePaletteManager&) { return *this; }
|
||||
|
||||
int _currIndex;
|
||||
|
||||
typedef std::map< const osg::Texture2D*, int > TextureIndexMap;
|
||||
@@ -54,6 +56,7 @@ protected:
|
||||
const FltExportVisitor& _nv;
|
||||
|
||||
const ExportOptions& _fltOpt;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1187,9 +1187,12 @@ class ReaderGEO
|
||||
return;
|
||||
}
|
||||
Group *makeTextGeode(const georecord *gr)
|
||||
{ // in geo text is defined with a matrix included in the geo.geode (gr is this geo.geode)
|
||||
{
|
||||
// in geo text is defined with a matrix included in the geo.geode (gr is this geo.geode)
|
||||
// - we need to create this tree to render text
|
||||
#if 1
|
||||
return NULL; // temporary disable april 2003
|
||||
#else
|
||||
Group *nug=new Group;
|
||||
const geoField *gfd=gr->getField(GEO_DB_RENDERGROUP_MAT);
|
||||
// may be used in future const unsigned int imat=gfd ? gfd->getInt():0;
|
||||
@@ -1202,7 +1205,9 @@ class ReaderGEO
|
||||
nug=NULL;
|
||||
}
|
||||
return nug;
|
||||
#endif
|
||||
}
|
||||
|
||||
Group *makeLightPointGeodes(const georecord *gr) {
|
||||
const geoField *gfd=gr->getField(GEO_DB_RENDERGROUP_MAT);
|
||||
Group *nug=new Group;
|
||||
|
||||
@@ -260,8 +260,8 @@ public:
|
||||
success = HDRWriter::writeHeader(source.get(),fout);
|
||||
if(!success)
|
||||
{
|
||||
return WriteResult::ERROR_IN_WRITING_FILE; // early out
|
||||
source = 0; // delete the temporary image
|
||||
return WriteResult::ERROR_IN_WRITING_FILE; // early out
|
||||
}
|
||||
|
||||
success = HDRWriter::writeRLE(source.get(), fout);
|
||||
|
||||
@@ -51,6 +51,9 @@ namespace iff
|
||||
inline std::ostream &os() { return os_; }
|
||||
|
||||
private:
|
||||
GenericParser& operator = (const GenericParser&) { return *this; }
|
||||
|
||||
|
||||
Chunk_list chunks_;
|
||||
std::ostream &os_;
|
||||
};
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace lwo2
|
||||
protected:
|
||||
virtual iff::Chunk *parse_chunk_data(const std::string &tag, const std::string &context, Iter it, Iter end);
|
||||
iff::Chunk *parse_subchunk(Iter &it, const std::string &context);
|
||||
|
||||
Parser& operator = (const Parser&) { return *this; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ MDLReader::~MDLReader()
|
||||
std::string MDLReader::getToken(std::string str, const char * delim,
|
||||
size_t & index)
|
||||
{
|
||||
size_t start, end;
|
||||
size_t start;
|
||||
size_t end = std::string::npos;
|
||||
std::string token;
|
||||
|
||||
// Look for the first non-occurrence of the delimiters
|
||||
|
||||
@@ -136,6 +136,8 @@ class OBJWriterNodeVisitor: public osg::NodeVisitor {
|
||||
|
||||
private:
|
||||
|
||||
OBJWriterNodeVisitor& operator = (const OBJWriterNodeVisitor&) { return *this; }
|
||||
|
||||
void processGeometry(osg::Geometry* geo, osg::Matrix& m);
|
||||
void processArray(const std::string& key, osg::Array* array, const osg::Matrix& m = osg::Matrix::identity(), bool isNormal = false);
|
||||
|
||||
|
||||
@@ -955,26 +955,6 @@ void* layerRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf)
|
||||
_parse->setCurrentNode(osgGroup.get());
|
||||
_parse->getCurrTop()->addChild(osgGroup.get());
|
||||
return (void*)1;
|
||||
|
||||
#if 0
|
||||
osg::Group* osgGroup = new osg::Group;
|
||||
_parse->setCurrentNode(osgGroup);
|
||||
_parse->getCurrTop()->addChild(osgGroup);
|
||||
_parse->addLayer(osgGroup);
|
||||
return (void*)1;
|
||||
|
||||
#else
|
||||
if (_parse->underLayerSubgraph()) return (void*)1;
|
||||
|
||||
osg::ref_ptr<GeodeGroup> layer = new GeodeGroup;
|
||||
|
||||
_parse->setLayerGeode(layer->getGeode());
|
||||
_parse->setUnderLayerSubgraph(true);
|
||||
_parse->setCurrentNode(layer.get());
|
||||
_parse->getCurrTop()->addChild(layer.get());
|
||||
|
||||
return (void *)1;
|
||||
#endif
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -308,9 +308,6 @@ bool TileMapper::canParentBeTraversed(const TileIdentifier& tid) const
|
||||
return (!parentHasSouthNeighour && !parentHasWestNeighour);
|
||||
}
|
||||
}
|
||||
// we shouldn't get here...
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void TileMapper::checkValidityOfAllVisibleTiles()
|
||||
|
||||
@@ -199,9 +199,7 @@ private:
|
||||
|
||||
friend struct _cmp_tri_interface_lt;
|
||||
|
||||
|
||||
|
||||
|
||||
tri_stripper& operator = (const tri_stripper&) { return *this; }
|
||||
|
||||
typedef common_structures::graph_array<triangle, char> triangles_graph;
|
||||
typedef common_structures::heap_array<triangle_degree, _cmp_tri_degree_gt> triangles_heap;
|
||||
|
||||
@@ -665,7 +665,7 @@ bool PixelBufferWin32::realizeImplementation()
|
||||
|
||||
if (_traits->sharedContext)
|
||||
{
|
||||
HGLRC hglrc;
|
||||
HGLRC hglrc = 0;
|
||||
|
||||
GraphicsWindowWin32* graphicsWindowWin32 = dynamic_cast<GraphicsWindowWin32*>(_traits->sharedContext);
|
||||
if (graphicsWindowWin32)
|
||||
|
||||
@@ -1901,8 +1901,6 @@ bool View::computeIntersections(float x,float y, osgUtil::LineSegmentIntersector
|
||||
intersections.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool View::computeIntersections(float x,float y, const osg::NodePath& nodePath, osgUtil::LineSegmentIntersector::Intersections& intersections,osg::Node::NodeMask traversalMask)
|
||||
|
||||
@@ -288,8 +288,6 @@ bool Viewer::readConfiguration(const std::string& filename)
|
||||
osg::notify(osg::NOTICE)<<"Error: Config file \""<<filename<<"\" does not contain a valid Viewer configuration."<<std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Viewer::isRealized() const
|
||||
|
||||
Reference in New Issue
Block a user