From 204ed48dc7d2915f24943358378abc05896a3595 Mon Sep 17 00:00:00 2001 From: Oleksandr Labetskyi Date: Mon, 10 Jun 2024 21:17:33 +0300 Subject: [PATCH] Hash remodel --- lib/preprocessor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 4ad0aea66ff..06d01cd1406 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -954,14 +954,16 @@ std::size_t Preprocessor::calculateHash(const simplecpp::TokenList &tokens1, con for (const simplecpp::Token *tok = tokens1.cfront(); tok; tok = tok->next) { if (!tok->comment) { hashData += tok->str(); - hashData += tok->location.line / tok->location.col; + hashData += static_cast(tok->location.line); + hashData += static_cast(tok->location.col); } } for (std::map::const_iterator it = mTokenLists.cbegin(); it != mTokenLists.cend(); ++it) { for (const simplecpp::Token *tok = it->second->cfront(); tok; tok = tok->next) { if (!tok->comment) { hashData += tok->str(); - hashData += tok->location.line / tok->location.col; + hashData += static_cast(tok->location.line); + hashData += static_cast(tok->location.col); } } }