Fix broken usage of emplace
No need to construct a temporary when using emplace.
Change-Id: I224054855d0098e128973b8bea23ac000e7231f6
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/manager.cpp b/manager.cpp
index d3e2973..4286e54 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -82,19 +82,17 @@
// after the manager is constructed.
_sigargs.emplace_back(
std::make_unique<SigArg>(
- std::make_tuple(
this,
dbusEvent,
- &group)));
+ &group));
// Register our callback and the context for
// each signal event.
_matches.emplace_back(
- sdbusplus::server::match::match(
_bus,
std::get<0>(*dbusEvent),
details::_signal,
- _sigargs.back().get()));
+ _sigargs.back().get());
}
}
@@ -145,18 +143,15 @@
throw std::runtime_error(
"Unimplemented interface: " + x.first);
- ref.emplace(
- std::make_pair(
- x.first,
- (maker->second)(_bus, path.c_str())));
+ ref.emplace(x.first,
+ (maker->second)(_bus, path.c_str()));
}
// Hang on to a reference to the object (interfaces)
// so it stays on the bus, and so we can make calls
// to it if needed.
_refs.emplace(
- std::make_pair(
- path, std::move(ref)));
+ path, std::move(ref));
}
catch (const std::exception &e) {
std::cerr << e.what() << std::endl;