Closed yakra closed 4 years ago
We're already using a move constructor rather than a copy. Our rvalue is the temporary std::string object constructed from char* token
.
Constructing in place has a small advantage over moving; our time savings are pretty close to but still slightly > 0.
Using std::move for the URL & primary label doesn't seem to help. Don't know how this works under the hood; just need to avoid speculating. :)
This, right here. https://github.com/yakra/DataProcessing/blob/166bc2c08340557c30d8bd92589fcd3ad4e370dd/siteupdate/cplusplus/classes/Waypoint/Waypoint.cpp#L25 Change push to emplace.