fixed clang-tidy errors
fixed clang compilation error and few clang-tidy issues
Tested:
- Code compiles, all unit tests are passing
- Number of reported clang-tidy issues decreased
Change-Id: Ie3f88db6e2dffb26ec6c56dbdc1ce5bad288dccd
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/tests/src/dbus_environment.hpp b/tests/src/dbus_environment.hpp
index 86d7007..eabb53a 100644
--- a/tests/src/dbus_environment.hpp
+++ b/tests/src/dbus_environment.hpp
@@ -119,14 +119,14 @@
setProperty(const std::string& path, const std::string& interfaceName,
const std::string& property, const T& newValue)
{
- auto setPromise = std::promise<boost::system::error_code>();
- auto future = setPromise.get_future();
+ auto promise = std::promise<boost::system::error_code>();
+ auto future = promise.get_future();
sdbusplus::asio::setProperty(
*DbusEnvironment::getBus(), DbusEnvironment::serviceName(), path,
interfaceName, property, std::move(newValue),
- [setPromise =
- std::move(setPromise)](boost::system::error_code ec) mutable {
- setPromise.set_value(ec);
+ [promise =
+ std::move(promise)](boost::system::error_code ec) mutable {
+ promise.set_value(ec);
});
return DbusEnvironment::waitForFuture(std::move(future));
}