Use std::size_t instead of int to store position in string

Using int caused a compilation error with GCC 12.

Fixes: QTBUG-115981
Change-Id: I82107b143995ced6de0facb41e9964e42148d402
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit 7d72d5053a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Michael Brüning 2023-08-10 13:24:04 +02:00 committed by Samuli Piippo
parent 94ee1bcf16
commit f6f7f8b569

View File

@ -29,7 +29,7 @@ index 2ceac904a3c..8496e309cec 100644
+
+ //quick workaround if filename length > 255 - ".rsp", just cut the dirs starting from the end
+ //please note ".$unique_name" is not used at the moment
+ int pos = 0;
+ std::size_t pos = 0;
+ std::string delimiter("_");
+ while (rspfile.length() > 250 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos)
+ rspfile = rspfile.substr(0,pos);