From 3cda894ca51fcdecd1c90190f30fe47379d05658 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 21 Jul 2002 10:44:25 +0000 Subject: [PATCH] Added default construction values for various member variables to fix report uninitialized variables. --- src/osgParticle/FluidFrictionOperator.cpp | 13 ++++++++++--- src/osgParticle/Particle.cpp | 4 +++- src/osgParticle/ParticleProcessor.cpp | 10 ++++++++-- src/osgParticle/ParticleSystem.cpp | 2 ++ 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/osgParticle/FluidFrictionOperator.cpp b/src/osgParticle/FluidFrictionOperator.cpp index 6ac4309d9..e9788b074 100644 --- a/src/osgParticle/FluidFrictionOperator.cpp +++ b/src/osgParticle/FluidFrictionOperator.cpp @@ -4,8 +4,14 @@ #include #include -osgParticle::FluidFrictionOperator::FluidFrictionOperator() -: Operator(), ovr_rad_(0) +osgParticle::FluidFrictionOperator::FluidFrictionOperator(): + Operator(), + A_(0), + B_(0), + density_(0), + viscosity_(0), + ovr_rad_(0), + current_program_(0) { setFluidToAir(); } @@ -16,7 +22,8 @@ osgParticle::FluidFrictionOperator::FluidFrictionOperator(const FluidFrictionOpe B_(copy.B_), density_(copy.density_), viscosity_(copy.viscosity_), - ovr_rad_(copy.ovr_rad_) + ovr_rad_(copy.ovr_rad_), + current_program_(0) { } diff --git a/src/osgParticle/Particle.cpp b/src/osgParticle/Particle.cpp index 8162e8126..d9b604f24 100644 --- a/src/osgParticle/Particle.cpp +++ b/src/osgParticle/Particle.cpp @@ -36,7 +36,9 @@ osgParticle::Particle::Particle() prev_pos_(0, 0, 0), position_(0, 0, 0), velocity_(0, 0, 0), - t0_(0) + t0_(0), + current_size_(0), + current_alpha_(0) { } diff --git a/src/osgParticle/ParticleProcessor.cpp b/src/osgParticle/ParticleProcessor.cpp index f8e24817f..13596f048 100644 --- a/src/osgParticle/ParticleProcessor.cpp +++ b/src/osgParticle/ParticleProcessor.cpp @@ -16,7 +16,10 @@ osgParticle::ParticleProcessor::ParticleProcessor() rf_(RELATIVE_TO_PARENTS), enabled_(true), t0_(-1), - ps_(0) + ps_(0), + need_ltw_matrix_(false), + need_wtl_matrix_(false), + current_nodevisitor_(0) { setCullingActive(false); } @@ -26,7 +29,10 @@ osgParticle::ParticleProcessor::ParticleProcessor(const ParticleProcessor ©, rf_(copy.rf_), enabled_(copy.enabled_), t0_(copy.t0_), - ps_(static_cast(copyop(copy.ps_.get()))) + ps_(static_cast(copyop(copy.ps_.get()))), + need_ltw_matrix_(copy.need_ltw_matrix_), + need_wtl_matrix_(copy.need_wtl_matrix_), + current_nodevisitor_(0) { } diff --git a/src/osgParticle/ParticleSystem.cpp b/src/osgParticle/ParticleSystem.cpp index 12b4e3477..868ddfc55 100644 --- a/src/osgParticle/ParticleSystem.cpp +++ b/src/osgParticle/ParticleSystem.cpp @@ -23,6 +23,7 @@ osgParticle::ParticleSystem::ParticleSystem() display_list_id_(-1), bmin_(0, 0, 0), bmax_(0, 0, 0), + reset_bounds_flag_(false), bounds_computed_(false), def_ptemp_(Particle()), last_frame_(0), @@ -43,6 +44,7 @@ osgParticle::ParticleSystem::ParticleSystem(const ParticleSystem ©, const os display_list_id_(-1), bmin_(copy.bmin_), bmax_(copy.bmax_), + reset_bounds_flag_(copy.reset_bounds_flag_), bounds_computed_(copy.bounds_computed_), def_ptemp_(copy.def_ptemp_), last_frame_(copy.last_frame_),