Browse Source

make copy constructor and a assignment operator private to avoid misuse of helper class scope guard

Signed-off-by: Kim Kulling <[email protected]>
Kim Kulling 10 years ago
parent
commit
098ddd3a95
1 changed files with 4 additions and 0 deletions
  1. 4 0
      code/BaseImporter.h

+ 4 - 0
code/BaseImporter.h

@@ -90,6 +90,10 @@ struct ScopeGuard
 	}
 	}
 
 
 private:
 private:
+    // no copying allowed.
+    ScopeGuard( const ScopeGuard & );
+    ScopeGuard &operator = ( const ScopeGuard & );
+
 	T* obj;
 	T* obj;
 	bool mdismiss;
 	bool mdismiss;
 };
 };