Skip to content

Commit

Permalink
Avoid moving a return value, it might prevent (N)RVO (#69)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
  • Loading branch information
ivanpauno authored Dec 17, 2020
1 parent 3dfb50d commit e67b3a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SensorFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ std::unique_ptr<Sensor> SensorFactory::CreateSensor(const sdf::Sensor &_sdf)
}

result.reset(sensor);
return std::move(result);
return result;
}

/////////////////////////////////////////////////
Expand Down

0 comments on commit e67b3a3

Please sign in to comment.