Consider code
std::vector<float> handle(const std::vector<float> &input, const std::size_t parameter){
if (parameter == 1)
return std::vector<float>(input);
std::vector<float> temp(input.size() * parameter);
for(std::size_t i = 0; i < temp.size(); ++i) {
temp[i] = input[i / parameter];
}
return temp;
}
As far as I understand, std::move
is superflous in classic situations, but what about condition statements and different possible return statements?
Should I use std::move
in return statements on the 3d and 8th line?