Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

Some alerts #46

Closed Milerius closed 5 years ago

Milerius commented 5 years ago

Hello reading code through a tool let me know about an alert in code, i share it with you:

missing const ref parameters or std::move:

(restinio/impl/connection_settings.hpp)

Capture d’écran 2019-08-17 à 11 00 23
eao197 commented 5 years ago

Hi, Roman!

Thanks for reporting this, but I don't see a problem here. An instance of connection_setting_t is created only once per HTTP-server. An incoming parser_settings object is a temporary and (I suppose) can be eliminated by the compiler. Anyway http_parser_settings is a POD C struct for that move operation has no significant effect.

Milerius commented 5 years ago

Ok no problem, i just share it with you sometimes it's can be helpfull

eao197 commented 5 years ago

Yes, thank you for your attention to the details.