From 7bccf5c995b37e6baf086e465da00a6a333361be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Tomic=CC=8Cevic=CC=81?= Date: Sun, 8 Nov 2015 19:05:34 +0100 Subject: [PATCH] made lockable work in const context --- threading/sync/lockable.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/threading/sync/lockable.hpp b/threading/sync/lockable.hpp index 01f627d94..2ed9ec605 100644 --- a/threading/sync/lockable.hpp +++ b/threading/sync/lockable.hpp @@ -10,17 +10,17 @@ class Lockable public: using lock_type = lock_t; - std::lock_guard acquire_guard() + std::lock_guard acquire_guard() const { return std::lock_guard(lock); } - std::unique_lock acquire_unique() + std::unique_lock acquire_unique() const { return std::unique_lock(lock); } - - lock_t lock; + + mutable lock_t lock; }; #endif