src: implemented move constructor/assignment for filepath
* improves indexing performance by roughly 5% * switched to use uniqu_ptr for boost path to get rid of including boost in header * added different methods to change the current FilePath or to make a copy and change that one * used these methods appropriately throughout the code base * removed exists() method from FileSystem because it is already contained in FilePath * added const in some places
This commit is contained in:
@@ -886,7 +886,7 @@ bool CxxAstVisitorComponentIndexer::isLocatedInProjectFile(clang::SourceLocation
|
||||
fileId = sourceManager.getFileID(loc);
|
||||
}
|
||||
|
||||
if (!fileId.isInvalid())
|
||||
if (fileId.isValid())
|
||||
{
|
||||
auto it = m_inProjectFileMap.find(fileId);
|
||||
if (it != m_inProjectFileMap.end())
|
||||
@@ -898,7 +898,7 @@ bool CxxAstVisitorComponentIndexer::isLocatedInProjectFile(clang::SourceLocation
|
||||
if (fileEntry != nullptr && fileEntry->isValid())
|
||||
{
|
||||
FilePath filePath = getAstVisitor()->getCanonicalFilePathCache()->getCanonicalFilePath(fileEntry);
|
||||
bool ret = m_fileRegister->hasFilePath(filePath);
|
||||
const bool ret = m_fileRegister->hasFilePath(filePath);
|
||||
m_inProjectFileMap[fileId] = ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user