summaryrefslogtreecommitdiff
path: root/Plugins/utils/mir_scope.h
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-05-02 00:08:17 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-05-02 00:08:17 +0000
commit7c52bd0b47d68806777152e097f1bf6f3f718170 (patch)
tree2b8bb05622141f9dff4a4fe1b53196b9860c2f1c /Plugins/utils/mir_scope.h
parent74de73a0d9a2a40ed77ac2ee6a2714ceb7c633b0 (diff)
utils: sync with berliOS
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@174 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/utils/mir_scope.h')
-rw-r--r--Plugins/utils/mir_scope.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/Plugins/utils/mir_scope.h b/Plugins/utils/mir_scope.h
index 31edde0..a18bf55 100644
--- a/Plugins/utils/mir_scope.h
+++ b/Plugins/utils/mir_scope.h
@@ -3,22 +3,20 @@
template<class T>
-class mir_scope
+class scope
{
public:
- mir_scope() : p(NULL) {}
- mir_scope(T t) : p(t) {}
- ~mir_scope() { release(); }
+ scope(T t) : p(t) {}
+ ~scope() { free(); }
- void release()
+ void free()
{
if (p != NULL)
mir_free(p);
p = NULL;
}
- T operator=(T t) { release(); p = t; return t; }
- T operator->() const { return p; }
+// T operator->() const { return p; }
operator T() const { return p; }
T detach()