From 5d917340652e878f247cfcbdcbb39ca05a97c9ba Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 26 Jan 2021 09:10:15 +0100 Subject: [PATCH] Merge #21010: refactor: remove straggling boost::mutex usage f827e151a2ce96e14aadb9e7d25045fe0a8afbd2 refactor: remove straggling boost::mutex usage (fanquake) Pull request description: After the merge of #18710, the linter is warning: ```bash A new Boost dependency in the form of "boost/thread/mutex.hpp" appears to have been introduced: src/sync.cpp:#include src/test/sync_tests.cpp:#include ^---- failure generated from test/lint/lint-includes.sh ``` #18710 removed `boost/thread/mutex.hpp` from lint-includes, however in the interim #19337 was merged, which introduced more `boost::mutex` usage. Given we no longer use `boost::mutex`, just remove the double lock test and remaining includes. ACKs for top commit: laanwj: Code review ACK f827e151a2ce96e14aadb9e7d25045fe0a8afbd2 hebasto: ACK f827e151a2ce96e14aadb9e7d25045fe0a8afbd2 Tree-SHA512: f738b12189fe5b39db3e8f8231e9002714413a962eaf98adc84a6614fa474df5616358cfb1c89b92a2b0564efa9b704a774c49d4a25dca18a0ccc3cd9eabfc0a --- src/sync.cpp | 3 --- src/test/sync_tests.cpp | 6 ------ 2 files changed, 9 deletions(-) diff --git a/src/sync.cpp b/src/sync.cpp index e641716eb8..d57bd79e7e 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -13,8 +13,6 @@ #include #include -#include - #include #include #include @@ -225,7 +223,6 @@ template void EnterCritical(const char*, const char*, int, Mutex*, bool); template void EnterCritical(const char*, const char*, int, RecursiveMutex*, bool); template void EnterCritical(const char*, const char*, int, std::mutex*, bool); template void EnterCritical(const char*, const char*, int, std::recursive_mutex*, bool); -template void EnterCritical(const char*, const char*, int, boost::mutex*, bool); void CheckLastCritical(void* cs, std::string& lockname, const char* guardname, const char* file, int line) { diff --git a/src/test/sync_tests.cpp b/src/test/sync_tests.cpp index bc14213ae8..25fca556a7 100644 --- a/src/test/sync_tests.cpp +++ b/src/test/sync_tests.cpp @@ -6,7 +6,6 @@ #include #include -#include #include @@ -136,11 +135,6 @@ BOOST_AUTO_TEST_CASE(double_lock_mutex) TestDoubleLock(true /* should throw */); } -BOOST_AUTO_TEST_CASE(double_lock_boost_mutex) -{ - TestDoubleLock(true /* should throw */); -} - BOOST_AUTO_TEST_CASE(double_lock_recursive_mutex) { TestDoubleLock(false /* should not throw */);