Skip to content

Commit

Permalink
Merged from svn/trunk changeset 12645. Removed redundent assert and a…
Browse files Browse the repository at this point in the history
…ssociated variables to fix warnings.
  • Loading branch information
robertosfield committed Jun 24, 2011
1 parent 5ac77fb commit cd4dd74
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/osgPlugins/3ds/WriterNodeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; iMat<nbMat; ++iMat)
{
bool found = false;
for(MaterialMap::iterator itr = _materialMap.begin(); itr != _materialMap.end(); ++itr)
{
const Material & mat = itr->second;
if (mat.index != static_cast<int>(iMat)) continue; // Ugly thing (2)
found = true;

assert(mat.index>=0 && mat.index < static_cast<int>(_materialMap.size()));
Lib3dsMaterial * mat3ds = lib3ds_material_new(osgDB::getSimpleFileName(mat.name).c_str());
copyOsgColorToLib3dsColor(mat3ds->ambient, mat.ambient);
copyOsgColorToLib3dsColor(mat3ds->diffuse, mat.diffuse);
Expand Down Expand Up @@ -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
}
}

Expand Down
9 changes: 0 additions & 9 deletions src/osgPlugins/ac/Geode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const osg::Texture2D*>(AttributeList.begin()->second.first.get());
Expand Down

0 comments on commit cd4dd74

Please sign in to comment.