Let lock_guard deduce its template argument
No functional change, this is a cleanup.
With C++17, it's no longer necessary to specify the teplate argument
when it can be deduced from the types of constructor arguments. This
allows de-cluttering our locking statements.
To avoid typos, this patch was mechanically generated:
perl -p -i -e 's/std::lock_guard<std::mutex>/std::lock_guard/g' \
$(find . -name '*.cpp' -o -name '*.h')
Change-Id: Ibb15d9a6c5b1c861d81353e47d25474eb1d4c2df
diff --git a/server/TrafficControllerTest.cpp b/server/TrafficControllerTest.cpp
index c3b6a6e..61622d8 100644
--- a/server/TrafficControllerTest.cpp
+++ b/server/TrafficControllerTest.cpp
@@ -79,7 +79,7 @@
BpfMap<uint32_t, uint8_t> mFakeUidOwnerMap;
void SetUp() {
- std::lock_guard<std::mutex> ownerGuard(mTc.mOwnerMatchMutex);
+ std::lock_guard ownerGuard(mTc.mOwnerMatchMutex);
SKIP_IF_BPF_NOT_SUPPORTED;
mFakeCookieTagMap.reset(createMap(BPF_MAP_TYPE_HASH, sizeof(uint64_t),