Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228764823
--- 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()));
--- End diff --
I think both work. I've always preferred the way I do it because of the
explicit naming of the move iterator -- it has resulted in less confusion with
newer developers, but again I recognize everyone has a different style, so I
won't attempt to push any style onto you. I even double checked after you
comment -- assembly output is identical, so I'm not sure I have a real
preference as I'm more 'function over style'
---