summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/clangrefactoring/sourcelocations.h21
-rw-r--r--src/plugins/clangrefactoring/symbolquery.h4
2 files changed, 13 insertions, 12 deletions
diff --git a/src/plugins/clangrefactoring/sourcelocations.h b/src/plugins/clangrefactoring/sourcelocations.h
index fe2d3dace9..9ae4241c01 100644
--- a/src/plugins/clangrefactoring/sourcelocations.h
+++ b/src/plugins/clangrefactoring/sourcelocations.h
@@ -39,24 +39,25 @@ class SourceLocations
public:
struct Location
{
- qint64 sourceId;
- qint64 line;
- qint64 column;
+ Location(qint64 sourceId, qint64 line, qint64 column)
+ : sourceId(sourceId), line(line), column(column)
+ {}
+
+ qint64 sourceId;
+ qint64 line;
+ qint64 column;
};
struct Source
{
+ Source(qint64 sourceId, Utils::PathString &&sourcePath)
+ : sourceId(sourceId), sourcePath(std::move(sourcePath))
+ {}
+
qint64 sourceId;
Utils::PathString sourcePath;
};
- enum LocationGetter
- {
- SourceId = 0,
- Line,
- Column
- };
-
std::vector<Location> locations;
std::unordered_map<qint64, Utils::PathString> sources;
};
diff --git a/src/plugins/clangrefactoring/symbolquery.h b/src/plugins/clangrefactoring/symbolquery.h
index 778156410a..19faf97229 100644
--- a/src/plugins/clangrefactoring/symbolquery.h
+++ b/src/plugins/clangrefactoring/symbolquery.h
@@ -52,7 +52,7 @@ public:
const std::size_t reserveSize = 128;
- auto locations = locationsStatement.template structValues<Location, qint64, qint64, qint64>(
+ auto locations = locationsStatement.template values<Location, 3>(
reserveSize,
filePath,
line,
@@ -62,7 +62,7 @@ public:
ReadStatement &sourcesStatement = m_statementFactory.selectSourcePathForId;
- auto sources = sourcesStatement.template structValues<Source, qint64, Utils::PathString>(
+ auto sources = sourcesStatement.template values<Source, 2>(
reserveSize,
sourceIds);