Address warnings found via Clang - especially related to destructor visibility with ref_ptrs of various kinds.

This commit is contained in:
James Turner 2011-10-24 18:09:42 +01:00
parent 7438aea869
commit 2fb13c76f5
6 changed files with 24 additions and 3 deletions

View File

@ -102,4 +102,14 @@ namespace effect
{
const char* colorFields[] = {"red", "green", "blue", "alpha"};
}
PassAttributeBuilder::~PassAttributeBuilder()
{
}
} // of namespace simgear

View File

@ -350,8 +350,11 @@ protected:
struct PassAttrMapSingleton : public simgear::Singleton<PassAttrMapSingleton>
{
PassAttrMap passAttrMap;
};
public:
virtual ~PassAttributeBuilder(); // anchor into the compilation unit.
virtual void buildAttribute(Effect* effect, Pass* pass,
const SGPropertyNode* prop,
const SGReaderWriterXMLOptions* options)

View File

@ -583,7 +583,7 @@ SGLoadBTG(const std::string& path, SGMaterialLib *matlib, bool calc_lights, bool
{
SGBinObject tile;
if (!tile.read_bin(path))
return false;
return NULL;
SGVec3d center = tile.get_gbs_center();
SGGeod geodPos = SGGeod::fromCart(center);
@ -604,7 +604,7 @@ SGLoadBTG(const std::string& path, SGMaterialLib *matlib, bool calc_lights, bool
SGTileGeometryBin tileGeometryBin;
if (!tileGeometryBin.insertBinObj(tile, matlib))
return false;
return NULL;
SGVec3f up(0, 0, 1);
GroundLightManager* lightManager = GroundLightManager::instance();

View File

@ -86,4 +86,10 @@ StateAttributeFactory::StateAttributeFactory()
_depthWritesDisabled->setDataVariance(Object::STATIC);
}
// anchor the destructor into this file, to avoid ref_ptr warnings
StateAttributeFactory::~StateAttributeFactory()
{
}
}

View File

@ -45,6 +45,8 @@ namespace simgear
class StateAttributeFactory :
public ReferencedSingleton<StateAttributeFactory> {
public:
~StateAttributeFactory();
// Alpha test > .01
osg::AlphaFunc* getStandardAlphaFunc() { return _standardAlphaFunc.get(); }
// alpha source, 1 - alpha destination

View File

@ -82,7 +82,7 @@ public:
/**
* Destructor
*/
~SGSoundSample ();
virtual ~SGSoundSample ();
/**
* Detect wheter this audio sample holds the information of a sound file.