Skip to content

[info] cppcheck 2.7 makes a debug build fail #6

@jmarrec

Description

@jmarrec

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions