KUNAI-static-analyzer icon indicating copy to clipboard operation
KUNAI-static-analyzer copied to clipboard

C++ Improvement: Change argument type to reference types when appropiate

Open Fare9 opened this issue 3 years ago • 0 comments

Whenever is possible change the type of some arguments for reference to the object, as if the type is not a reference, argument will be given as copy, and in case of copying std::string or std::vector and so on, this will make C++ create space in heap for a new object, and then a copy will be created, in that case if will be only used for reading just pass a reference.

Fare9 avatar Dec 15 '21 22:12 Fare9