summaryrefslogtreecommitdiff
path: root/louloulibs/utils/scopeguard.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-05-04 14:16:40 +0200
committerlouiz’ <louiz@louiz.org>2016-05-04 14:16:40 +0200
commitaf42073830087d97385e507f27f601e8769541b0 (patch)
treed7187f5dcbf73cf73776c6c9dad01ad4d0a25b51 /louloulibs/utils/scopeguard.hpp
parent305e01c0b58ec5cfee276841488f9c24835ce923 (diff)
downloadbiboumi-af42073830087d97385e507f27f601e8769541b0.tar.gz
biboumi-af42073830087d97385e507f27f601e8769541b0.tar.bz2
biboumi-af42073830087d97385e507f27f601e8769541b0.tar.xz
biboumi-af42073830087d97385e507f27f601e8769541b0.zip
Style fix
Move all constructors at the top of classes
Diffstat (limited to 'louloulibs/utils/scopeguard.hpp')
-rw-r--r--louloulibs/utils/scopeguard.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/louloulibs/utils/scopeguard.hpp b/louloulibs/utils/scopeguard.hpp
index df78831..fed40ff 100644
--- a/louloulibs/utils/scopeguard.hpp
+++ b/louloulibs/utils/scopeguard.hpp
@@ -40,6 +40,12 @@ public:
{
this->add_callback(std::move(func));
}
+
+ ScopeGuard(const ScopeGuard&) = delete;
+ ScopeGuard& operator=(ScopeGuard&&) = delete;
+ ScopeGuard(ScopeGuard&&) = delete;
+ ScopeGuard& operator=(const ScopeGuard&) = delete;
+
/**
* default constructor, the scope guard is enabled but empty, use
* add_callback()
@@ -78,10 +84,6 @@ private:
bool enabled;
std::vector<std::function<void()>> callbacks;
- ScopeGuard(const ScopeGuard&) = delete;
- ScopeGuard& operator=(ScopeGuard&&) = delete;
- ScopeGuard(ScopeGuard&&) = delete;
- ScopeGuard& operator=(const ScopeGuard&) = delete;
};
}