From fe685228e608a16ff16df5e39c1ba0a6da4f0ccc Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 23 Jun 2025 17:07:05 +0200 Subject: CPlusPlus: Save a few cycles in Client::isInjectedFile() ... by moving to FilePath and FilePath::pathView(). This shouldn't be a lot as FilePath::toUrlishString() comes back quickly for local paths, but with this change there's no string creation at all, and the caller side is uniform now. Task-number: QTCREATORBUG-33116 Change-Id: Icc8669571c7e99ab73b3576af50a2ffbe7ce726b Reviewed-by: Christian Kandeler --- src/libs/cplusplus/FastPreprocessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs/cplusplus/FastPreprocessor.cpp') diff --git a/src/libs/cplusplus/FastPreprocessor.cpp b/src/libs/cplusplus/FastPreprocessor.cpp index b2fb0bfc58f..1633063c81a 100644 --- a/src/libs/cplusplus/FastPreprocessor.cpp +++ b/src/libs/cplusplus/FastPreprocessor.cpp @@ -33,7 +33,7 @@ QByteArray FastPreprocessor::run(Document::Ptr newDoc, _merged.insert(filePath); for (Snapshot::const_iterator i = _snapshot.begin(), ei = _snapshot.end(); i != ei; ++i) { - if (isInjectedFile(i.key().path())) + if (isInjectedFile(i.key())) mergeEnvironment(i.key()); } -- cgit v1.2.3