diff --git a/include/osgGA/GUIEventHandler b/include/osgGA/GUIEventHandler index 0a09b496a..4dce9b72d 100644 --- a/include/osgGA/GUIEventHandler +++ b/include/osgGA/GUIEventHandler @@ -52,7 +52,9 @@ class OSGGA_EXPORT GUIEventHandler : public osg::NodeCallback, public osg::Drawa public: 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) {} META_Object(osgGA,GUIEventHandler); diff --git a/include/osgManipulator/Dragger b/include/osgManipulator/Dragger index 3c4376ed7..7edb3cf84 100644 --- a/include/osgManipulator/Dragger +++ b/include/osgManipulator/Dragger @@ -43,8 +43,11 @@ extern OSGMANIPULATOR_EXPORT void computeNodePathToRoot(osg::Node& node, osg::No class DraggerCallback : virtual public osg::Object { public: - DraggerCallback() {} - DraggerCallback(const DraggerCallback&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) {} + DraggerCallback(): + osg::Object(true) {} + + DraggerCallback(const DraggerCallback&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): + osg::Object(true) {} META_Object(osgManipulator, DraggerCallback); diff --git a/include/osgSim/ShapeAttribute b/include/osgSim/ShapeAttribute index cbaf7ec17..1c1045f6c 100644 --- a/include/osgSim/ShapeAttribute +++ b/include/osgSim/ShapeAttribute @@ -14,10 +14,8 @@ #ifndef OSGSIM_SHAPEATTRIBUTE #define OSGSIM_SHAPEATTRIBUTE 1 -#include -#include - #include +#include #include @@ -85,7 +83,7 @@ class OSGSIM_EXPORT ShapeAttribute }; -class OSGSIM_EXPORT ShapeAttributeList : public osg::Object, public std::vector +class OSGSIM_EXPORT ShapeAttributeList : public osg::Object, public osg::MixinVector { public: 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 * shallow vs deep copying of dynamic data.*/ ShapeAttributeList(const ShapeAttributeList& sal,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - osg::Object(sal, copyop) + osg::Object(sal, copyop), + MixinVector(sal) { - std::copy(sal.begin(),sal.end(), begin()); } /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ diff --git a/src/osgPlugins/zip/unzip.cpp b/src/osgPlugins/zip/unzip.cpp index b464924f6..540bb596f 100644 --- a/src/osgPlugins/zip/unzip.cpp +++ b/src/osgPlugins/zip/unzip.cpp @@ -268,7 +268,12 @@ bool FileExists(const TCHAR *fn) // unz_global_info structure contain global data about the ZIPfile 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 } 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 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 } unz_file_info_internal; @@ -2902,21 +2910,34 @@ typedef struct // unz_s contain internal information about the zipfile -typedef struct +typedef struct unz_ss { - LUFILE* file; // io structore of the zipfile - unz_global_info gi; // public global information - uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx) - uLong num_file; // number of the current file in the zipfile - uLong pos_in_central_dir; // pos of the current file in the central dir - uLong current_file_ok; // flag about the usability of the current file - uLong central_pos; // position of the beginning of the central dir + 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) + { + } - uLong size_central_dir; // size of the central directory - uLong offset_central_dir; // offset of start of central directory with respect to the starting disk number + LUFILE* file; // io structore of the zipfile + unz_global_info gi; // public global information + uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx) + uLong num_file; // number of the current file in the zipfile + uLong pos_in_central_dir; // pos of the current file in the central dir + uLong current_file_ok; // flag about the usability of the current file + uLong central_pos; // position of the beginning of the central dir - unz_file_info cur_file_info; // public info about the current file in zip - unz_file_info_internal cur_file_info_internal; // private info about it + uLong size_central_dir; // size of the central directory + uLong offset_central_dir; // offset of start of central directory with respect to the starting disk number + + unz_file_info cur_file_info; // public info about the current file in zip + unz_file_info_internal cur_file_info_internal; // private info about it file_in_zip_read_info_s* pfile_in_zip_read; // structure about the current file if we are decompressing it } unz_s, *unzFile; @@ -3099,7 +3120,7 @@ unzFile unzOpenInternal(LUFILE *fin) if (unz_copyright[0]!=' ') {lufclose(fin); return NULL;} int err=UNZ_OK; - unz_s us={0}; + unz_s us; uLong central_pos=0,uL=0; central_pos = unzlocal_SearchCentralDir(fin); if (central_pos==0xFFFFFFFF) err=UNZ_ERRNO; diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index d09c4f65c..909216bd3 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -28,7 +28,8 @@ CompositeViewer::CompositeViewer() } CompositeViewer::CompositeViewer(const CompositeViewer& cv,const osg::CopyOp& copyop): - ViewerBase() + osg::Object(true), + ViewerBase(cv) { constructorInit(); } diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index d8f8214a3..ada376867 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -157,6 +157,7 @@ View::View(): View::View(const osgViewer::View& view, const osg::CopyOp& copyop): + osg::Object(true), osg::View(view,copyop), osgGA::GUIActionAdapter(), _startTick(0), diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index 36b64a3d7..4d1d2d677 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -194,6 +194,8 @@ Viewer::Viewer(osg::ArgumentParser& arguments) } Viewer::Viewer(const osgViewer::Viewer& viewer, const osg::CopyOp& copyop): + osg::Object(true), + ViewerBase(viewer), View(viewer,copyop) { _viewerBase = this; diff --git a/src/osgViewer/ViewerBase.cpp b/src/osgViewer/ViewerBase.cpp index 6371f9829..3874b0b7d 100644 --- a/src/osgViewer/ViewerBase.cpp +++ b/src/osgViewer/ViewerBase.cpp @@ -44,7 +44,7 @@ ViewerBase::ViewerBase(): viewerBaseInit(); } -ViewerBase::ViewerBase(const ViewerBase& base): +ViewerBase::ViewerBase(const ViewerBase&): osg::Object(true) { viewerBaseInit();