From d5f476a8227866f2afafc47558fb374bb69fd8dc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 24 Jun 2011 16:16:04 +0000 Subject: [PATCH] Merged from svn/trunk changeset 12645. Removed redundent assert and associated variables to fix warnings. --- src/osgPlugins/3ds/WriterNodeVisitor.cpp | 4 ---- src/osgPlugins/ac/Geode.cpp | 9 --------- 2 files changed, 13 deletions(-) diff --git a/src/osgPlugins/3ds/WriterNodeVisitor.cpp b/src/osgPlugins/3ds/WriterNodeVisitor.cpp index 35b2e17bc..a9e41115f 100644 --- a/src/osgPlugins/3ds/WriterNodeVisitor.cpp +++ b/src/osgPlugins/3ds/WriterNodeVisitor.cpp @@ -483,14 +483,11 @@ void WriterNodeVisitor::writeMaterials() // Ugly thing: it seems lib3ds_file_insert_material() doesn't support insertion in a random order (else materials are not assigned the right way) for (unsigned int iMat=0; iMatsecond; if (mat.index != static_cast(iMat)) continue; // Ugly thing (2) - found = true; - assert(mat.index>=0 && mat.index < static_cast(_materialMap.size())); Lib3dsMaterial * mat3ds = lib3ds_material_new(osgDB::getSimpleFileName(mat.name).c_str()); copyOsgColorToLib3dsColor(mat3ds->ambient, mat.ambient); copyOsgColorToLib3dsColor(mat3ds->diffuse, mat.diffuse); @@ -545,7 +542,6 @@ void WriterNodeVisitor::writeMaterials() lib3ds_file_insert_material(_file3ds, mat3ds, itr->second.index); break; // Ugly thing (3) } - assert(found); // Ugly thing (4) - Implementation error if !found } } diff --git a/src/osgPlugins/ac/Geode.cpp b/src/osgPlugins/ac/Geode.cpp index c6decb34f..a8bddbfed 100644 --- a/src/osgPlugins/ac/Geode.cpp +++ b/src/osgPlugins/ac/Geode.cpp @@ -784,19 +784,10 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset) // Check for a texture if (theState) { - const osg::StateSet::TextureModeList& TextureModeList = theState->getTextureModeList(); const osg::StateSet::TextureAttributeList& TextureAttributeList = theState->getTextureAttributeList(); if (TextureAttributeList.size() > 0) { - // Dont yet know how to handle more than one texture - assert(TextureAttributeList.size() == 1); - assert(TextureModeList.size() == 1); - const osg::StateSet::ModeList& ModeList = TextureModeList[0]; - assert(ModeList.size() == 1); // Check for a single mode of GL_TEXTURE_2D and ON - osg::StateSet::ModeList::value_type ModeValuePair = *ModeList.begin(); - assert(ModeValuePair.first == GL_TEXTURE_2D); - assert(ModeValuePair.second == osg::StateAttribute::ON); const osg::StateSet::AttributeList& AttributeList = TextureAttributeList[0]; // assert(AttributeList.size() == 1); const osg::Texture2D *pTexture2D = dynamic_cast(AttributeList.begin()->second.first.get());