浏览代码

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 年之前
父节点
当前提交
098ddd3a95
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      code/BaseImporter.h

+ 4 - 0
code/BaseImporter.h

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