From: Tim Moore Date: Fri, 6 Feb 2009 23:37:47 +0000 (+0100) Subject: Make SGSubsystemGroup::Member copy constructor private. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f86e6d344c97bdabbe017ee666258cf760680e8c;p=simgear.git 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. --- 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);