clang-tidy: Enable modernize-use-emplace check
The check flags insertions to an STL-style container done by
calling the push_back, push, or push_front methods with an
explicitly-constructed temporary of the container element type.
In this case, the corresponding emplace equivalent methods result
in less verbose and potentially more efficient code.
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I540c22d3d26195a9d1ead57a4322541951c9ff53
diff --git a/manager/lamptest/lamptest.cpp b/manager/lamptest/lamptest.cpp
index 8b98fbc..3ae6d36 100644
--- a/manager/lamptest/lamptest.cpp
+++ b/manager/lamptest/lamptest.cpp
@@ -49,8 +49,7 @@
}
}
- updatedLEDsDuringLampTest.emplace(
- std::make_pair(ledsAssert, ledsDeAssert));
+ updatedLEDsDuringLampTest.emplace(ledsAssert, ledsDeAssert);
return true;
}
return false;