src: Improved code view snippet generation performance

This commit is contained in:
Eberhard Graether
2018-03-22 01:46:35 +01:00
parent ce78412190
commit 0d79639c96
10 changed files with 137 additions and 104 deletions
+14 -2
View File
@@ -250,12 +250,24 @@ std::shared_ptr<SourceLocationFile> StorageAccessProxy::getSourceLocationsForFil
}
std::shared_ptr<SourceLocationFile> StorageAccessProxy::getSourceLocationsForLinesInFile(
const FilePath& filePath, uint firstLineNumber, uint lastLineNumber
const FilePath& filePath, size_t startLine, size_t endLine
) const
{
if (hasSubject())
{
return m_subject->getSourceLocationsForLinesInFile(filePath, firstLineNumber, lastLineNumber);
return m_subject->getSourceLocationsForLinesInFile(filePath, startLine, endLine);
}
return std::make_shared<SourceLocationFile>(FilePath(), false, false);
}
std::shared_ptr<SourceLocationFile> StorageAccessProxy::getSourceLocationsOfTypeInFile(
const FilePath& filePath, LocationType type
) const
{
if (hasSubject())
{
return m_subject->getSourceLocationsOfTypeInFile(filePath, type);
}
return std::make_shared<SourceLocationFile>(FilePath(), false, false);