Added {} brackets around OSG_DEBUG usage to avoid issues with marco's expanding if else.

This commit is contained in:
Robert Osfield 2016-06-14 16:42:06 +01:00
parent 8457990bb1
commit 9139e8acb8

View File

@ -61,9 +61,13 @@ osg::Object* ObjectCache::getFromObjectCache(const std::string& fileName, const
{ {
osg::ref_ptr<const osgDB::Options> o = itr->first.second; osg::ref_ptr<const osgDB::Options> o = itr->first.second;
if (o.valid()) if (o.valid())
{
OSG_DEBUG<<"Found "<<fileName<<" with options '"<< o->getOptionString()<< "' in ObjectCache "<<this<<std::endl; OSG_DEBUG<<"Found "<<fileName<<" with options '"<< o->getOptionString()<< "' in ObjectCache "<<this<<std::endl;
}
else else
{
OSG_DEBUG<<"Found "<<fileName<<" in ObjectCache "<<this<<std::endl; OSG_DEBUG<<"Found "<<fileName<<" in ObjectCache "<<this<<std::endl;
}
return itr->second.first.get(); return itr->second.first.get();
} }
else return 0; else return 0;
@ -78,9 +82,13 @@ osg::ref_ptr<osg::Object> ObjectCache::getRefFromObjectCache(const std::string&
{ {
osg::ref_ptr<const osgDB::Options> o = itr->first.second; osg::ref_ptr<const osgDB::Options> o = itr->first.second;
if (o.valid()) if (o.valid())
{
OSG_DEBUG<<"Found "<<fileName<<" with options '"<< o->getOptionString()<< "' in ObjectCache "<<this<<std::endl; OSG_DEBUG<<"Found "<<fileName<<" with options '"<< o->getOptionString()<< "' in ObjectCache "<<this<<std::endl;
}
else else
{
OSG_DEBUG<<"Found "<<fileName<<" in ObjectCache "<<this<<std::endl; OSG_DEBUG<<"Found "<<fileName<<" in ObjectCache "<<this<<std::endl;
}
return itr->second.first.get(); return itr->second.first.get();
} }
else return 0; else return 0;