generated from cpp-best-practices/gui_starter_template
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
This is only for std::string_view
. I built cppcheck today from main, at danmar/cppcheck@24e9859
/home/julien/Software/Others/json2cpp/src/json2cpp.hpp:20:48: performance: Function parameter 'document_name' should be passed by const reference. [passedByValue]
compile_results compile(const std::string_view document_name, const nlohmann::json &json);
^
I realize this is idiomatic, but I thought you may be interested in knowing that currently it will fail, as it is enabled by default (provided you have cppcheck installed already on your system)
Note: I opened a PR to cppcheck to allow passing std::string_view
by value: danmar/cppcheck#3817
Metadata
Metadata
Assignees
Labels
No labels