summaryrefslogtreecommitdiff
path: root/Plugins/utils/mir_scope.h
diff options
context:
space:
mode:
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()