]> git.mxchange.org Git - simgear.git/commitdiff
Address warnings found via Clang - especially related to destructor visibility with...
authorJames Turner <zakalawe@mac.com>
Mon, 24 Oct 2011 17:09:42 +0000 (18:09 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 24 Oct 2011 17:09:42 +0000 (18:09 +0100)
simgear/scene/material/EffectBuilder.cxx
simgear/scene/material/EffectBuilder.hxx
simgear/scene/tgdb/obj.cxx
simgear/scene/util/StateAttributeFactory.cxx
simgear/scene/util/StateAttributeFactory.hxx
simgear/sound/sample_openal.hxx

index 338fc9aa33a34f274598225bc967e7cb89d86e5c..79ebb2482bb1d9b21c1907ed13fc204ccb12d289 100644 (file)
@@ -102,4 +102,14 @@ namespace effect
 {
 const char* colorFields[] = {"red", "green", "blue", "alpha"};
 }
+  
+PassAttributeBuilder::~PassAttributeBuilder()
+{
 }
+  
+} // of namespace simgear
+
+
+
+
+
index a30efa5ebd4d7873d4d76399b84400d7379fc38b..3165ae1829935995e505682ebf9b80edebe0fcbc 100644 (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)
index 36011d723e489a60cc894c9d46dd0abbf0f364c5..6e16dc7077d05b95f0ff02a8c7232885093b09b2 100644 (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();
index 25a0a57622860f841105ebd9985de3613682c220..3e289ad57e9d4e51895e3e67388ba1ae169cb51b 100644 (file)
@@ -86,4 +86,10 @@ StateAttributeFactory::StateAttributeFactory()
     _depthWritesDisabled->setDataVariance(Object::STATIC);
 }
 
+// anchor the destructor into this file, to avoid ref_ptr warnings
+StateAttributeFactory::~StateAttributeFactory()
+{
+  
+}
+  
 }
index 0076fa510e6befa8f07c37edc2cadf2e6a95eeab..47603e7b70d2a8ab64486657547113cb548688df 100644 (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
index b5267bb10ca1963d8ddcf2e4bf8e759168f79326..9e816c21aaf9aed5316003e9f590135829258a3c 100644 (file)
@@ -82,7 +82,7 @@ public:
     /**
      * Destructor
      */
-    ~SGSoundSample ();
+    virtual ~SGSoundSample ();
 
     /**
      * Detect wheter this audio sample holds the information of a sound file.