diff --git a/src/plugins/clangtools/clangfixitsrefactoringchanges.cpp b/src/plugins/clangtools/clangfixitsrefactoringchanges.cpp index d1094d0dac8..5f5102d7944 100644 --- a/src/plugins/clangtools/clangfixitsrefactoringchanges.cpp +++ b/src/plugins/clangtools/clangfixitsrefactoringchanges.cpp @@ -178,29 +178,6 @@ void FixitsRefactoringFile::shiftAffectedReplacements(const ReplacementOperation } } -bool FixitsRefactoringFile::hasIntersection(const FilePath &filePath, - const Text::Replacements &replacements, - int startIndex) const -{ - for (int i = startIndex; i < m_replacementOperations.size(); ++i) { - const ReplacementOperation ¤t = *m_replacementOperations[i]; - if (filePath != current.filePath) - continue; - - // Usually the number of replacements is from 1 to 3. - if (std::any_of(replacements.begin(), - replacements.end(), - [¤t](const Text::Replacement &replacement) { - return replacement.offset + replacement.length > current.pos - && replacement.offset < current.pos + current.length; - })) { - return true; - } - } - - return false; -} - void FixitsRefactoringFile::shiftAffectedReplacements(const FilePath &filePath, const Text::Replacements &replacements, int startIndex) diff --git a/src/plugins/clangtools/clangfixitsrefactoringchanges.h b/src/plugins/clangtools/clangfixitsrefactoringchanges.h index 31f4412236a..7a1eecc9fc9 100644 --- a/src/plugins/clangtools/clangfixitsrefactoringchanges.h +++ b/src/plugins/clangtools/clangfixitsrefactoringchanges.h @@ -50,9 +50,6 @@ private: void shiftAffectedReplacements(const Utils::FilePath &filePath, const Utils::Text::Replacements &replacements, int startIndex); - bool hasIntersection(const Utils::FilePath &filePath, - const Utils::Text::Replacements &replacements, - int startIndex) const; mutable Utils::TextFileFormat m_textFileFormat; mutable QHash m_documents;