src: replaced some usages of string by wstring in filepath
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "data/indexer/IndexerCommand.h"
|
||||
|
||||
#include "utility/utilityString.h"
|
||||
|
||||
IndexerCommand::IndexerCommand(
|
||||
const FilePath& sourceFilePath, const std::set<FilePath>& indexedPaths, const std::set<FilePath>& excludedPaths
|
||||
)
|
||||
@@ -15,16 +17,16 @@ IndexerCommand::~IndexerCommand()
|
||||
|
||||
size_t IndexerCommand::getByteSize(size_t stringSize) const
|
||||
{
|
||||
size_t size = m_sourceFilePath.str().size();
|
||||
size_t size = utility::encodeToUtf8(m_sourceFilePath.wstr()).size();
|
||||
|
||||
for (const FilePath& path: m_indexedPaths)
|
||||
{
|
||||
size += stringSize + path.str().size();
|
||||
size += stringSize + utility::encodeToUtf8(path.wstr()).size();
|
||||
}
|
||||
|
||||
for (const FilePath& path : m_excludedPaths)
|
||||
{
|
||||
size += stringSize + path.str().size();
|
||||
size += stringSize + utility::encodeToUtf8(path.wstr()).size();
|
||||
}
|
||||
|
||||
return size;
|
||||
|
||||
@@ -1885,7 +1885,7 @@ TooltipInfo PersistentStorage::getTooltipInfoForSourceLocationIdsAndLocalSymbolI
|
||||
const NameHierarchy nameHierarchy = NameHierarchy::deserialize(node.serializedName);
|
||||
snippet.code = codec.encode(nameHierarchy.getQualifiedName());
|
||||
snippet.locationFile = std::make_shared<SourceLocationFile>(
|
||||
FilePath(nameHierarchy.getDelimiter() == NAME_DELIMITER_JAVA ? "main.java" : "main.cpp"), true, true);
|
||||
FilePath(nameHierarchy.getDelimiter() == NAME_DELIMITER_JAVA ? L"main.java" : L"main.cpp"), true, true);
|
||||
|
||||
snippet.locationFile->addSourceLocation(
|
||||
LOCATION_TOKEN, 0, std::vector<Id>(1, node.id), 1, 1, 1, snippet.code.size());
|
||||
@@ -2645,7 +2645,7 @@ void PersistentStorage::buildMemberEdgeIdOrderMap()
|
||||
intToLocationType(location.type),
|
||||
location.id,
|
||||
std::vector<Id>(),
|
||||
FilePath(std::to_string(location.fileNodeId)),
|
||||
FilePath(std::to_wstring(location.fileNodeId)),
|
||||
location.startLine,
|
||||
location.startCol,
|
||||
location.endLine,
|
||||
|
||||
Reference in New Issue
Block a user