Github user arpadboda commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228764104
--- Diff: libminifi/src/FlowController.cpp ---
@@ -911,11 +911,18 @@ uint64_t FlowController::getUptime() {
}
std::vector<BackTrace> FlowController::getTraces() {
- std::vector<BackTrace> traces;
+ std::vector<BackTrace> traces;
auto timer_driven = timer_scheduler_->getTraces();
traces.insert(traces.end(),
std::make_move_iterator(timer_driven.begin()),
std::make_move_iterator(timer_driven.end()));
auto event_driven = event_scheduler_->getTraces();
traces.insert(traces.end(),
std::make_move_iterator(event_driven.begin()),
std::make_move_iterator(event_driven.end()));
+ // repositories
+ auto prov_repo_trace = provenance_repo_->getTraces();
+ traces.emplace_back(std::move(prov_repo_trace));
--- End diff --
Emplacing doesn't make sense in case the argument type is the same as the
container template type.
---