From: Razvan Becheriu Date: Tue, 15 Oct 2019 08:29:50 +0000 (+0300) Subject: use std::lock_guard whenever possible X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60c4d8e47f487dac66eeb2e0439f04898e201019;p=thirdparty%2Fkea.git use std::lock_guard whenever possible --- diff --git a/src/lib/util/threads/lock_guard.h b/src/lib/util/threads/lock_guard.h deleted file mode 100644 index 6c949a29f6..0000000000 --- a/src/lib/util/threads/lock_guard.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef LOCK_GUARD_H -#define LOCK_GUARD_H - -#include - -namespace isc { -namespace util { -namespace thread { - -template -class LockGuard { -public: - LockGuard(Lock* lock) : lk_(lock) { - if (lk_) { - lk_->lock(); - } - } - - ~LockGuard() { - if (lk_) { - lk_->unlock(); - } - } - - LockGuard(const LockGuard&) = delete; - LockGuard& operator=(const LockGuard&) = delete; - - LockGuard(LockGuard&&) = delete; - LockGuard& operator=(LockGuard&&) = delete; - -private: - Lock* lk_; -}; - -} // namespace thread -} // namespace util -} // namespace isc - -#endif // LOCK_GUARD_H