refactoring: Increased constness of function parameters
This commit is contained in:
parent
345a7f2c9b
commit
6d7a0e65b3
|
@ -62,7 +62,7 @@ void CppCheck::addFile( const std::string &path, const std::string &content )
|
||||||
_fileContents[ path ] = content;
|
_fileContents[ path ] = content;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CppCheck::parseFromArgs( int argc, char* argv[] )
|
std::string CppCheck::parseFromArgs( int argc, const char* argv[] )
|
||||||
{
|
{
|
||||||
std::vector<std::string> pathnames;
|
std::vector<std::string> pathnames;
|
||||||
bool Recursive = false;
|
bool Recursive = false;
|
||||||
|
|
|
@ -89,7 +89,7 @@ class CppCheck : public ErrorLogger
|
||||||
* string containing "help" text if no files were found to be
|
* string containing "help" text if no files were found to be
|
||||||
* checked.
|
* checked.
|
||||||
*/
|
*/
|
||||||
std::string parseFromArgs( int argc, char* argv[] );
|
std::string parseFromArgs( int argc, const char* argv[] );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void checkFile(const std::string &code, const char FileName[]);
|
void checkFile(const std::string &code, const char FileName[]);
|
||||||
|
|
|
@ -30,7 +30,7 @@ CppCheckExecutor::~CppCheckExecutor()
|
||||||
//dtor
|
//dtor
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppCheckExecutor::check( int argc, char* argv[] )
|
void CppCheckExecutor::check( int argc, const char* argv[] )
|
||||||
{
|
{
|
||||||
CppCheck cppCheck( *this );
|
CppCheck cppCheck( *this );
|
||||||
std::string result = cppCheck.parseFromArgs( argc, argv );
|
std::string result = cppCheck.parseFromArgs( argc, argv );
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
* @param argc from main()
|
* @param argc from main()
|
||||||
* @param argv from main()
|
* @param argv from main()
|
||||||
*/
|
*/
|
||||||
void check( int argc, char* argv[] );
|
void check( int argc, const char* argv[] );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Errors and warnings are directed here. This should be
|
* Errors and warnings are directed here. This should be
|
||||||
|
|
Loading…
Reference in New Issue