Skip to content

Commit 3e0e3ff

Browse files
committed
Make calculateHash const
1 parent ddb384f commit 3e0e3ff

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/cppcheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ static simplecpp::TokenList createTokenList(const std::string& filename, std::ve
850850
return {filename, files, outputList};
851851
}
852852

853-
std::size_t CppCheck::calculateHash(const Preprocessor& preprocessor, const simplecpp::TokenList& tokens)
853+
std::size_t CppCheck::calculateHash(const Preprocessor& preprocessor, const simplecpp::TokenList& tokens) const
854854
{
855855
std::ostringstream toolinfo;
856856
toolinfo << (mSettings.cppcheckCfgProductName.empty() ? CPPCHECK_VERSION_STRING : mSettings.cppcheckCfgProductName);

lib/cppcheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class CPPCHECKLIB CppCheck {
170170
* @param tokens Token list from preprocessed file.
171171
* @return hash
172172
*/
173-
std::size_t calculateHash(const Preprocessor &preprocessor, const simplecpp::TokenList &tokens);
173+
std::size_t calculateHash(const Preprocessor &preprocessor, const simplecpp::TokenList &tokens) const;
174174

175175
/**
176176
* @brief Check a file using stream

0 commit comments

Comments
 (0)