diff options
| author | yum <yum.food.vr@gmail.com> | 2023-09-13 21:43:33 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-09-13 21:55:05 -0700 |
| commit | 703e183e430f15aff6005d38aefcacf91e2314cd (patch) | |
| tree | 93f647cf7e4be14e36fa9d9b79ea9717fe93e417 /BrowserSource/Proxy/ScopeGuard.h | |
| parent | 8fcc6c248554a0b08ecd4b43cc0971b78810c080 (diff) | |
General cleanupv0.15.3
Remove unused proxy code, curl, and images.
Diffstat (limited to 'BrowserSource/Proxy/ScopeGuard.h')
| -rw-r--r-- | BrowserSource/Proxy/ScopeGuard.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/BrowserSource/Proxy/ScopeGuard.h b/BrowserSource/Proxy/ScopeGuard.h deleted file mode 100644 index 61bb64d..0000000 --- a/BrowserSource/Proxy/ScopeGuard.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include <functional> -#include <utility> - -class ScopeGuard { -public: - ScopeGuard(std::function<void()>&& cb) : cb_(std::move(cb)), active_(true) {} - ~ScopeGuard() { - Invoke(); - } - - ScopeGuard() = delete; - ScopeGuard(ScopeGuard&) = delete; - ScopeGuard(const ScopeGuard&) = delete; - ScopeGuard(ScopeGuard&&) = delete; - ScopeGuard& operator=(ScopeGuard&) = delete; - ScopeGuard& operator=(const ScopeGuard&) = delete; - - void Cancel() { active_ = false; } - - void Invoke() { - if (active_) { - cb_(); - active_ = false; - } - } - -private: - const std::function<void()> cb_; - bool active_; -}; |
