Skip to content

Commit 204ed48

Browse files
committed
Hash remodel
1 parent 8173aa8 commit 204ed48

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: lib/preprocessor.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -954,14 +954,16 @@ std::size_t Preprocessor::calculateHash(const simplecpp::TokenList &tokens1, con
954954
for (const simplecpp::Token *tok = tokens1.cfront(); tok; tok = tok->next) {
955955
if (!tok->comment) {
956956
hashData += tok->str();
957-
hashData += tok->location.line / tok->location.col;
957+
hashData += static_cast<char>(tok->location.line);
958+
hashData += static_cast<char>(tok->location.col);
958959
}
959960
}
960961
for (std::map<std::string, simplecpp::TokenList *>::const_iterator it = mTokenLists.cbegin(); it != mTokenLists.cend(); ++it) {
961962
for (const simplecpp::Token *tok = it->second->cfront(); tok; tok = tok->next) {
962963
if (!tok->comment) {
963964
hashData += tok->str();
964-
hashData += tok->location.line / tok->location.col;
965+
hashData += static_cast<char>(tok->location.line);
966+
hashData += static_cast<char>(tok->location.col);
965967
}
966968
}
967969
}

0 commit comments

Comments
 (0)