Skip to content
Snippets Groups Projects
Commit acc916ed authored by Hans Johnson's avatar Hans Johnson
Browse files

COMP: Prefer const pointer when value does not change

The check finds function parameters of a pointer type that could be changed to
point to a constant type instead.

When const is used properly, many mistakes can be avoided. Advantages when
using const properly:
 - prevent unintentional modification of data;
 - get additional warnings such as using uninitialized data;
 - make it easier for developers to see possible side effects.

This check is not strict about constness, it only warns when the constness will
make the function interface safer.
parent 7be4043f
Branches
No related tags found
1 merge request!169Modernize code for cmake and C++11
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment