forked from qt-creator/qt-creator
ClangTools: remove unused function
Change-Id: I7551f30b6b9c925290837f53b9ad4ceca66b5fab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -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,
|
void FixitsRefactoringFile::shiftAffectedReplacements(const FilePath &filePath,
|
||||||
const Text::Replacements &replacements,
|
const Text::Replacements &replacements,
|
||||||
int startIndex)
|
int startIndex)
|
||||||
|
@@ -50,9 +50,6 @@ private:
|
|||||||
void shiftAffectedReplacements(const Utils::FilePath &filePath,
|
void shiftAffectedReplacements(const Utils::FilePath &filePath,
|
||||||
const Utils::Text::Replacements &replacements,
|
const Utils::Text::Replacements &replacements,
|
||||||
int startIndex);
|
int startIndex);
|
||||||
bool hasIntersection(const Utils::FilePath &filePath,
|
|
||||||
const Utils::Text::Replacements &replacements,
|
|
||||||
int startIndex) const;
|
|
||||||
|
|
||||||
mutable Utils::TextFileFormat m_textFileFormat;
|
mutable Utils::TextFileFormat m_textFileFormat;
|
||||||
mutable QHash<Utils::FilePath, QTextDocument *> m_documents;
|
mutable QHash<Utils::FilePath, QTextDocument *> m_documents;
|
||||||
|
Reference in New Issue
Block a user