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
-37
View File
@@ -1,37 +0,0 @@
/*
* Copyright 2018 Coati Software KG
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef SOURCETRAIL_SOURCE_LOCATION_H
#define SOURCETRAIL_SOURCE_LOCATION_H
#include <string>
namespace sourcetrail
{
/**
* Struct that represents a single character location in a source file.
*
* Note: Line and column numbers start at 1 instead of 0!
*/
struct SourceLocation
{
std::string filePath;
int line;
int column;
};
}
#endif // SOURCETRAIL_SOURCE_LOCATION_H
+2 -3
View File
@@ -17,18 +17,17 @@
#ifndef SOURCETRAIL_SOURCE_RANGE_H
#define SOURCETRAIL_SOURCE_RANGE_H
#include <string>
namespace sourcetrail
{
/**
* Struct that represents the location of a range of characters in a source file.
*
* Note: Line and column numbers start at 1 instead of 0!
* Note: The SourceRange includes both, the start and the end column number.
*/
struct SourceRange
{
std::string filePath;
int fileId;
int startLine;
int startColumn;
int endLine;