From f86e6d344c97bdabbe017ee666258cf760680e8c Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Sat, 7 Feb 2009 00:37:47 +0100 Subject: [PATCH] Make SGSubsystemGroup::Member copy constructor private. The copy constructor wouldn't make any sense and would confuse ownership of the subsystem pointer. Problem noted by John Denker. --- simgear/structure/subsystem_mgr.cxx | 2 +- simgear/structure/subsystem_mgr.hxx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/simgear/structure/subsystem_mgr.cxx b/simgear/structure/subsystem_mgr.cxx index 00f17b38..8109f411 100644 --- a/simgear/structure/subsystem_mgr.cxx +++ b/simgear/structure/subsystem_mgr.cxx @@ -290,9 +290,9 @@ SGSubsystemGroup::Member::Member () { } +// This shouldn't be called due to subsystem pointer ownership issues. SGSubsystemGroup::Member::Member (const Member &) { - Member(); } SGSubsystemGroup::Member::~Member () diff --git a/simgear/structure/subsystem_mgr.hxx b/simgear/structure/subsystem_mgr.hxx index c759e790..63cad43e 100644 --- a/simgear/structure/subsystem_mgr.hxx +++ b/simgear/structure/subsystem_mgr.hxx @@ -317,10 +317,12 @@ public: private: - struct Member { + class Member { - Member (); + private: Member (const Member &member); + public: + Member (); virtual ~Member (); virtual void update (double delta_time_sec); -- 2.39.5