to silence following warnings from clang 9.0.1:
src/crimson/osd/heartbeat.cc:143:14: warning: local variable 'extras' will be copied despite being returned by name [-Wreturn-std-move]
return extras;
^~~~~~
../src/crimson/osd/heartbeat.cc:143:14: note: call 'std::move' explicitly to avoid copying
return extras;
^~~~~~
std::move(extras)
Signed-off-by: Kefu Chai <kchai@redhat.com>
if (extra >= 0) {
extras.push_back(extra);
}
- return extras;
+ return std::move(extras);
});
}