use file id instead of file path in recorded locations

This commit is contained in:
mlangkabel
2018-12-14 18:37:40 +01:00
parent 3b0008585e
commit 4517be935c
9 changed files with 57 additions and 90 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ namespace sourcetrail
const std::vector<std::string> tableNames = {
"meta",
"error"
"error",
"component_access",
"occurrence",
"source_location",
+2 -5
View File
@@ -550,9 +550,8 @@ namespace sourcetrail
try
{
const int fileId = addFile(location.filePath);
const int sourceLocationId = m_storage->addSourceLocation(StorageSourceLocationData(
fileId,
location.fileId,
location.startLine,
location.startColumn,
location.endLine,
@@ -724,10 +723,8 @@ namespace sourcetrail
void SourcetrailDBWriter::addSourceLocation(int elementId, const SourceRange& location, LocationKind kind)
{
const int fileId = addFile(location.filePath);
const int sourceLocationId = m_storage->addSourceLocation(StorageSourceLocationData(
fileId,
location.fileId,
location.startLine,
location.startColumn,
location.endLine,