utility: added FilePath abstraction and rewrote data management to use it
The utility class FilePath wraps an instance of boost::filesystem::path. Using FilePath allows for easy comparision of file paths on different platforms using absolute or relative paths. Whereever file paths are compared, this wrapper should be used.
This commit is contained in:
@@ -108,7 +108,7 @@ std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForActiveTok
|
||||
for (CodeView::CodeSnippetParams& params : fileSnippets)
|
||||
{
|
||||
params.locationFile = m_locationAccess->getTokenLocationsForLinesInFile(
|
||||
file->getFilePath(), params.startLineNumber, params.endLineNumber);
|
||||
file->getFilePath().str(), params.startLineNumber, params.endLineNumber);
|
||||
}
|
||||
|
||||
if (declarationId != 0)
|
||||
@@ -144,7 +144,7 @@ std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForActiveTok
|
||||
|
||||
std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForFile(const TokenLocationFile* file) const
|
||||
{
|
||||
std::shared_ptr<TextAccess> textAccess = TextAccess::createFromFile(file->getFilePath());
|
||||
std::shared_ptr<TextAccess> textAccess = TextAccess::createFromFile(file->getFilePath().str());
|
||||
|
||||
std::vector<std::pair<uint, uint>> ranges = getSnippetRangesForFile(file);
|
||||
std::vector<CodeView::CodeSnippetParams> snippets;
|
||||
|
||||
Reference in New Issue
Block a user