From eac88fc64a22f483c23729f57c2d3e89d476cc62 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 17 Oct 2018 19:43:41 +0200 Subject: [PATCH] chan: disable AnimControl copy ctor and assignment operators --- panda/src/chan/animControl.cxx | 4 ++-- panda/src/chan/animControl.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/panda/src/chan/animControl.cxx b/panda/src/chan/animControl.cxx index aa47ea7486..df7fb26498 100644 --- a/panda/src/chan/animControl.cxx +++ b/panda/src/chan/animControl.cxx @@ -32,14 +32,14 @@ AnimControl(const std::string &name, PartBundle *part, Namable(name), _pending_lock(name), _pending_cvar(_pending_lock), - _bound_joints(BitArray::all_on()) + _bound_joints(BitArray::all_on()), + _part(part) { #ifdef DO_MEMORY_USAGE MemoryUsage::update_type(this, get_class_type()); #endif _pending = true; - _part = part; _anim = nullptr; _channel_index = -1; set_frame_rate(frame_rate); diff --git a/panda/src/chan/animControl.h b/panda/src/chan/animControl.h index bee9f7223b..d52b2e4835 100644 --- a/panda/src/chan/animControl.h +++ b/panda/src/chan/animControl.h @@ -39,6 +39,8 @@ class EXPCL_PANDA_CHAN AnimControl : public TypedReferenceCount, public AnimInte public: AnimControl(const std::string &name, PartBundle *part, double frame_rate, int num_frames); + AnimControl(const AnimControl ©) = delete; + void setup_anim(PartBundle *part, AnimBundle *anim, int channel_index, const BitArray &bound_joints); void set_bound_joints(const BitArray &bound_joints); @@ -82,7 +84,7 @@ private: // This is a PT(PartGroup) instead of a PT(PartBundle), just because we // can't include partBundle.h for circular reasons. But it actually keeps a // pointer to a PartBundle. - PT(PartGroup) _part; + const PT(PartGroup) _part; PT(AnimBundle) _anim; int _channel_index;