]> git.mxchange.org Git - simgear.git/commitdiff
Make SGSubsystemGroup::Member copy constructor private.
authorTim Moore <timoore@redhat.com>
Fri, 6 Feb 2009 23:37:47 +0000 (00:37 +0100)
committerTim Moore <timoore@redhat.com>
Fri, 6 Feb 2009 23:37:47 +0000 (00:37 +0100)
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
simgear/structure/subsystem_mgr.hxx

index 00f17b38acefee08a24c03af5ea797e3d98b8021..8109f41132b6397802308b60ac1b2c6ed54aa985 100644 (file)
@@ -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 ()
index c759e7901ada9fbe2f4c5f8b5d6c69621d9ea51b..63cad43e769121515d3b0c6321365a2cd57bff77 100644 (file)
@@ -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);