skypjack / uvw

Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
MIT License
1.84k stars 209 forks source link

Possibly unnecessary std::string copy? #238

Closed fireice-uk closed 3 years ago

fireice-uk commented 3 years ago

Is this copy necessary (on this and similar functions)?

https://github.com/skypjack/uvw/blob/58b299ee60d62386a2339dab3f99d30570b33085/src/uvw/tcp.cpp#L46-L52

To my eye const std::string & would work just as well

stefanofiorentino commented 3 years ago

I guess you are right, in order to evaluate case by case, would you perchance like to propose a pull request for these (others)?

stefanofiorentino commented 3 years ago

@fireice-uk any news about this?

fireice-uk commented 3 years ago

I should be able to get some time to do this later this week :)