Fixed warnings.

OpenSceneGraph/src/osgGA/NodeTrackerManipulator.cpp:32:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgGA/TerrainManipulator.cpp:31:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/include/osgSim/ShapeAttribute:99:9: warning: base class ?class std::vector<osgSim::ShapeAttribute>? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::gi?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::byte_before_the_zipfile?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::num_file?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::pos_in_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::current_file_ok?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::central_pos?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::size_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::offset_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::cur_file_info?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::cur_file_info_internal?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::pfile_in_zip_read?
OpenSceneGraph/src/osgViewer/CompositeViewer.cpp:30:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/View.cpp:159:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/Viewer.cpp:196:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/Viewer.cpp:196:1: warning: base class ?class osgViewer::ViewerBase? should be explicitly initialized in the copy constructor
OpenSceneGraph/include/osgManipulator/Dragger:47:9: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
This commit is contained in:
Robert Osfield 2011-06-23 11:09:49 +00:00
parent 8570c37ed5
commit 7455f6265c
8 changed files with 53 additions and 25 deletions

View File

@ -52,7 +52,9 @@ class OSGGA_EXPORT GUIEventHandler : public osg::NodeCallback, public osg::Drawa
public: public:
GUIEventHandler() : _ignoreHandledEventsMask(GUIEventAdapter::NONE) {} GUIEventHandler() : _ignoreHandledEventsMask(GUIEventAdapter::NONE) {}
GUIEventHandler(const GUIEventHandler& eh,const osg::CopyOp&): GUIEventHandler(const GUIEventHandler& eh,const osg::CopyOp& copyop):
osg::NodeCallback(eh, copyop),
osg::Drawable::EventCallback(eh, copyop),
_ignoreHandledEventsMask(eh._ignoreHandledEventsMask) {} _ignoreHandledEventsMask(eh._ignoreHandledEventsMask) {}
META_Object(osgGA,GUIEventHandler); META_Object(osgGA,GUIEventHandler);

View File

@ -43,8 +43,11 @@ extern OSGMANIPULATOR_EXPORT void computeNodePathToRoot(osg::Node& node, osg::No
class DraggerCallback : virtual public osg::Object class DraggerCallback : virtual public osg::Object
{ {
public: public:
DraggerCallback() {} DraggerCallback():
DraggerCallback(const DraggerCallback&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) {} osg::Object(true) {}
DraggerCallback(const DraggerCallback&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
osg::Object(true) {}
META_Object(osgManipulator, DraggerCallback); META_Object(osgManipulator, DraggerCallback);

View File

@ -14,10 +14,8 @@
#ifndef OSGSIM_SHAPEATTRIBUTE #ifndef OSGSIM_SHAPEATTRIBUTE
#define OSGSIM_SHAPEATTRIBUTE 1 #define OSGSIM_SHAPEATTRIBUTE 1
#include <string>
#include <vector>
#include <osg/Object> #include <osg/Object>
#include <osg/MixinVector>
#include <osgSim/Export> #include <osgSim/Export>
@ -85,7 +83,7 @@ class OSGSIM_EXPORT ShapeAttribute
}; };
class OSGSIM_EXPORT ShapeAttributeList : public osg::Object, public std::vector<ShapeAttribute> class OSGSIM_EXPORT ShapeAttributeList : public osg::Object, public osg::MixinVector<ShapeAttribute>
{ {
public: public:
META_Object(osgSim, ShapeAttributeList) META_Object(osgSim, ShapeAttributeList)
@ -97,9 +95,9 @@ class OSGSIM_EXPORT ShapeAttributeList : public osg::Object, public std::vector<
/** Copy constructor, optional CopyOp object can be used to control /** Copy constructor, optional CopyOp object can be used to control
* shallow vs deep copying of dynamic data.*/ * shallow vs deep copying of dynamic data.*/
ShapeAttributeList(const ShapeAttributeList& sal,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): ShapeAttributeList(const ShapeAttributeList& sal,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
osg::Object(sal, copyop) osg::Object(sal, copyop),
MixinVector<ShapeAttribute>(sal)
{ {
std::copy(sal.begin(),sal.end(), begin());
} }
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/

View File

@ -268,7 +268,12 @@ bool FileExists(const TCHAR *fn)
// unz_global_info structure contain global data about the ZIPfile // unz_global_info structure contain global data about the ZIPfile
typedef struct unz_global_info_s typedef struct unz_global_info_s
{ unsigned long number_entry; // total number of entries in the central dir on this disk {
unz_global_info_s():
number_entry(0),
size_comment(0) {}
unsigned long number_entry; // total number of entries in the central dir on this disk
unsigned long size_comment; // size of the global comment of the zipfile unsigned long size_comment; // size of the global comment of the zipfile
} unz_global_info; } unz_global_info;
@ -2745,6 +2750,9 @@ const char unz_copyright[] = " unzip 0.15 Copyright 1998 Gilles Vollant ";
// unz_file_info_interntal contain internal info about a file in zipfile // unz_file_info_interntal contain internal info about a file in zipfile
typedef struct unz_file_info_internal_s typedef struct unz_file_info_internal_s
{ {
unz_file_info_internal_s():
offset_curfile(0) {}
uLong offset_curfile;// relative offset of local header 4 bytes uLong offset_curfile;// relative offset of local header 4 bytes
} unz_file_info_internal; } unz_file_info_internal;
@ -2902,8 +2910,21 @@ typedef struct
// unz_s contain internal information about the zipfile // unz_s contain internal information about the zipfile
typedef struct typedef struct unz_ss
{ {
unz_ss():
file(0),
byte_before_the_zipfile(0),
num_file(0),
pos_in_central_dir(0),
current_file_ok(0),
central_pos(0),
size_central_dir(0),
offset_central_dir(0),
pfile_in_zip_read(0)
{
}
LUFILE* file; // io structore of the zipfile LUFILE* file; // io structore of the zipfile
unz_global_info gi; // public global information unz_global_info gi; // public global information
uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx) uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx)
@ -3099,7 +3120,7 @@ unzFile unzOpenInternal(LUFILE *fin)
if (unz_copyright[0]!=' ') {lufclose(fin); return NULL;} if (unz_copyright[0]!=' ') {lufclose(fin); return NULL;}
int err=UNZ_OK; int err=UNZ_OK;
unz_s us={0}; unz_s us;
uLong central_pos=0,uL=0; uLong central_pos=0,uL=0;
central_pos = unzlocal_SearchCentralDir(fin); central_pos = unzlocal_SearchCentralDir(fin);
if (central_pos==0xFFFFFFFF) err=UNZ_ERRNO; if (central_pos==0xFFFFFFFF) err=UNZ_ERRNO;

View File

@ -28,7 +28,8 @@ CompositeViewer::CompositeViewer()
} }
CompositeViewer::CompositeViewer(const CompositeViewer& cv,const osg::CopyOp& copyop): CompositeViewer::CompositeViewer(const CompositeViewer& cv,const osg::CopyOp& copyop):
ViewerBase() osg::Object(true),
ViewerBase(cv)
{ {
constructorInit(); constructorInit();
} }

View File

@ -157,6 +157,7 @@ View::View():
View::View(const osgViewer::View& view, const osg::CopyOp& copyop): View::View(const osgViewer::View& view, const osg::CopyOp& copyop):
osg::Object(true),
osg::View(view,copyop), osg::View(view,copyop),
osgGA::GUIActionAdapter(), osgGA::GUIActionAdapter(),
_startTick(0), _startTick(0),

View File

@ -194,6 +194,8 @@ Viewer::Viewer(osg::ArgumentParser& arguments)
} }
Viewer::Viewer(const osgViewer::Viewer& viewer, const osg::CopyOp& copyop): Viewer::Viewer(const osgViewer::Viewer& viewer, const osg::CopyOp& copyop):
osg::Object(true),
ViewerBase(viewer),
View(viewer,copyop) View(viewer,copyop)
{ {
_viewerBase = this; _viewerBase = this;

View File

@ -44,7 +44,7 @@ ViewerBase::ViewerBase():
viewerBaseInit(); viewerBaseInit();
} }
ViewerBase::ViewerBase(const ViewerBase& base): ViewerBase::ViewerBase(const ViewerBase&):
osg::Object(true) osg::Object(true)
{ {
viewerBaseInit(); viewerBaseInit();