From cdd45c449f69f541ea78a5d6924eb2d81dcbb46b Mon Sep 17 00:00:00 2001 From: Trent Houliston Date: Wed, 4 Sep 2024 17:40:03 +1000 Subject: [PATCH] clang-tidy --- src/util/TypeMap.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/TypeMap.hpp b/src/util/TypeMap.hpp index 5abe1268..4ba0d4d1 100644 --- a/src/util/TypeMap.hpp +++ b/src/util/TypeMap.hpp @@ -81,7 +81,7 @@ namespace util { * @param d A pointer to the data to be stored (the map takes ownership) */ static void set(std::shared_ptr d) { - std::lock_guard lock(data_mutex); + const std::lock_guard lock(data_mutex); data = d; } @@ -91,7 +91,7 @@ namespace util { * @return A shared_ptr to the data that was previously stored */ static std::shared_ptr get() { - std::lock_guard lock(data_mutex); + const std::lock_guard lock(data_mutex); return data; } };