src: switched to use only wstring for FilePath::filename and FilePath::extension

This commit is contained in:
mlangkabel
2018-02-09 17:04:17 +01:00
parent 70d619a173
commit e31624a4b7
30 changed files with 68 additions and 80 deletions
+1 -1
View File
@@ -448,7 +448,7 @@ void Application::updateTitle()
if (!projectPath.empty())
{
title += L" - " + projectPath.wFileName();
title += L" - " + projectPath.fileName();
}
}
@@ -505,7 +505,7 @@ std::wstring BookmarkController::getNodeDisplayName(const Id nodeId) const
if (type.isFile())
{
return FilePath(nameHierarchy.getQualifiedName()).wFileName();
return FilePath(nameHierarchy.getQualifiedName()).fileName();
}
return nameHierarchy.getQualifiedName();
@@ -40,7 +40,7 @@ void CodeController::handleMessage(MessageActivateAll* message)
}
CodeSnippetParams statsSnippet;
statsSnippet.title = currentProject->getProjectSettingsFilePath().withoutExtension().wFileName();
statsSnippet.title = currentProject->getProjectSettingsFilePath().withoutExtension().fileName();
statsSnippet.startLineNumber = 1;
statsSnippet.endLineNumber = 1;
@@ -62,7 +62,7 @@ bool CodeSnippetParams::sort(const CodeSnippetParams& a, const CodeSnippetParams
// alphabetical filepath without extension
else
{
return aFilePath.withoutExtension().wFileName() < bFilePath.withoutExtension().wFileName();
return aFilePath.withoutExtension().fileName() < bFilePath.withoutExtension().fileName();
}
}
+5 -5
View File
@@ -702,7 +702,7 @@ std::vector<SearchMatch> PersistentStorage::getAutocompletionFileMatches(const s
match.tokenIds = utility::toVector(result.elementIds);
const FilePath path(match.name);
match.text = path.wFileName();
match.text = path.fileName();
match.subtext = path.wstr();
match.delimiter = NAME_DELIMITER_FILE;
@@ -797,7 +797,7 @@ std::vector<SearchMatch> PersistentStorage::getSearchMatchesForTokenIds(const st
if (match.nodeType.isFile())
{
match.text = FilePath(match.text).wFileName();
match.text = FilePath(match.text).fileName();
}
matches.push_back(match);
@@ -2182,7 +2182,7 @@ void PersistentStorage::addNodesToGraph(const std::vector<Id>& newNodeIds, Graph
Node* node = graph->createNode(
storageNode.id,
type,
NameHierarchy(filePath.wFileName(), NAME_DELIMITER_FILE),
NameHierarchy(filePath.fileName(), NAME_DELIMITER_FILE),
defined
);
node->addComponentFilePath(std::make_shared<TokenComponentFilePath>(filePath));
@@ -2513,7 +2513,7 @@ void PersistentStorage::buildFilePathMaps()
m_fileNodePaths.emplace(file.id, path);
m_fileNodeComplete.emplace(file.id, file.complete);
if (!m_hasJavaFiles && path.extension() == ".java")
if (!m_hasJavaFiles && path.extension() == L".java")
{
m_hasJavaFiles = true;
}
@@ -2622,7 +2622,7 @@ void PersistentStorage::buildMemberEdgeIdOrderMap()
}
const FilePath path(m_fileNodePaths[location.fileNodeId]);
if (path.extension() == ".java")
if (path.extension() == L".java")
{
collection.addSourceLocation(
intToLocationType(location.type),
+2 -2
View File
@@ -85,9 +85,9 @@ void Project::load()
const FilePath projectSettingsPath = m_settings->getFilePath();
const std::string dbExtension = (projectSettingsPath.extension() == ".coatiproject" ? "coatidb" : "srctrldb");
const std::wstring dbExtension = (projectSettingsPath.extension() == L".coatiproject" ? L"coatidb" : L"srctrldb");
const FilePath dbPath = FilePath(projectSettingsPath).replaceExtension(dbExtension);
const FilePath bookmarkPath = FilePath(projectSettingsPath).replaceExtension("srctrlbm");
const FilePath bookmarkPath = FilePath(projectSettingsPath).replaceExtension(L"srctrlbm");
m_storage = std::make_shared<PersistentStorage>(dbPath, bookmarkPath);
+1 -1
View File
@@ -116,7 +116,7 @@ void ProjectSettings::setProjectFilePath(std::wstring projectName, const FilePat
std::wstring ProjectSettings::getProjectName() const
{
return getFilePath().withoutExtension().wFileName();
return getFilePath().withoutExtension().fileName();
}
FilePath ProjectSettings::getProjectDirectoryPath() const
@@ -221,7 +221,7 @@ void CommandLineParser::processProjectfile()
m_projectFile.makeAbsolute();
const std::wstring errorstring =
L"Provided Projectfile is not valid:\n* Provided Projectfile('" + m_projectFile.wFileName() + L"') ";
L"Provided Projectfile is not valid:\n* Provided Projectfile('" + m_projectFile.fileName() + L"') ";
if (!m_projectFile.exists())
{
m_errorString = errorstring + L" does not exist";
@@ -229,7 +229,7 @@ void CommandLineParser::processProjectfile()
return;
}
if (m_projectFile.extension() != ".srctrlprj" && m_projectFile.extension() != ".coatiproject")
if (m_projectFile.extension() != L".srctrlprj" && m_projectFile.extension() != L".coatiproject")
{
m_errorString = errorstring + L" has a wrong file ending";
m_projectFile = FilePath();
+6 -16
View File
@@ -381,22 +381,12 @@ std::string FilePath::getBackslashedString() const
return utility::replace(str(), "/", "\\");
}
std::string FilePath::fileName() const
{
return m_path->filename().generic_string();
}
std::wstring FilePath::wFileName() const
std::wstring FilePath::fileName() const
{
return m_path->filename().generic_wstring();
}
std::string FilePath::extension() const
{
return m_path->extension().generic_string();
}
std::wstring FilePath::wExtension() const
std::wstring FilePath::extension() const
{
return m_path->extension().generic_wstring();
}
@@ -406,15 +396,15 @@ FilePath FilePath::withoutExtension() const
return FilePath(getPath().replace_extension().wstring());
}
FilePath FilePath::replaceExtension(const std::string& extension) const
FilePath FilePath::replaceExtension(const std::wstring& extension) const
{
return FilePath(getPath().replace_extension(extension).wstring());
}
bool FilePath::hasExtension(const std::vector<std::string>& extensions) const
bool FilePath::hasExtension(const std::vector<std::wstring>& extensions) const
{
std::string e = extension();
for (const std::string& ext : extensions)
const std::wstring e = extension();
for (const std::wstring& ext : extensions)
{
if (e == ext)
{
+4 -6
View File
@@ -51,14 +51,12 @@ public:
std::string str() const;
std::wstring wstr() const;
std::string getBackslashedString() const;
std::string fileName() const;
std::wstring wFileName() const;
std::wstring fileName() const;
std::string extension() const;
std::wstring wExtension() const;
std::wstring extension() const;
FilePath withoutExtension() const;
FilePath replaceExtension(const std::string& extension) const;
bool hasExtension(const std::vector<std::string>& extensions) const;
FilePath replaceExtension(const std::wstring& extension) const;
bool hasExtension(const std::vector<std::wstring>& extensions) const;
FilePath& operator=(const FilePath& other);
FilePath& operator=(FilePath&& other);
+1 -1
View File
@@ -116,7 +116,7 @@ std::vector<FileInfo> FileSystem::getFileInfosFromPaths(
}
}
}
else if (path.exists() && (ext.empty() || ext.find(utility::toLowerCase(path.wExtension())) != ext.end()))
else if (path.exists() && (ext.empty() || ext.find(utility::toLowerCase(path.extension())) != ext.end()))
{
const FilePath canonicalPath = path.getCanonical();
boost::filesystem::path p = canonicalPath.getPath();
+2 -2
View File
@@ -40,7 +40,7 @@ std::vector<FilePath> FileTree::doGetAbsoluteRootPathsForRelativeFilePath(const
{
std::vector<FilePath> rootPaths;
std::unordered_map<std::string, std::set<FilePath>>::const_iterator it = m_files.find(relativeFilePath.fileName());
std::unordered_map<std::wstring, std::set<FilePath>>::const_iterator it = m_files.find(relativeFilePath.fileName());
if (it != m_files.end())
{
for (FilePath existingFilePath : it->second)
@@ -51,7 +51,7 @@ std::vector<FilePath> FileTree::doGetAbsoluteRootPathsForRelativeFilePath(const
FilePath temp = relativeFilePath.getParentDirectory();
while (!temp.empty())
{
if (temp.fileName() == "..")
if (temp.fileName() == L"..")
{
std::vector<FilePath> subDirectories = FileSystem::getDirectSubDirectories(existingFilePath);
if (!subDirectories.empty())
+1 -1
View File
@@ -19,7 +19,7 @@ private:
std::vector<FilePath> doGetAbsoluteRootPathsForRelativeFilePath(const FilePath& relativeFilePath, bool allowMultipleResults);
FilePath m_rootPath;
std::unordered_map<std::string, std::set<FilePath>> m_files;
std::unordered_map<std::wstring, std::set<FilePath>> m_files;
};
#endif // FILE_TREE_H
+1 -1
View File
@@ -119,7 +119,7 @@ ScopedTrace<TracerType>::ScopedTrace(
{
m_event = TracerType::getInstance()->startEvent(eventName);
m_event->functionName = functionName;
m_event->locationName = FilePath(fileName).fileName() + ":" + std::to_string(lineNumber);
m_event->locationName = utility::encodeToUtf8(FilePath(fileName).fileName()) + ":" + std::to_string(lineNumber);
m_timeStamp = utility::durationStart();
}
@@ -147,7 +147,7 @@ void CxxAstVisitorComponentIndexer::beginTraverseLambdaCapture(clang::LambdaExpr
{
ParseLocation declLocation = getParseLocation(d->getLocation());
std::wstring name =
declLocation.filePath.wFileName() + L"<" +
declLocation.filePath.fileName() + L"<" +
std::to_wstring(declLocation.startLineNumber) + L":" +
std::to_wstring(declLocation.startColumnNumber) + L">";
m_client->recordLocalSymbol(name, getParseLocation(capture->getLocation()));
@@ -234,7 +234,7 @@ void CxxAstVisitorComponentIndexer::visitVarDecl(clang::VarDecl* d)
{
ParseLocation declLocation = getParseLocation(d->getLocation());
std::wstring name =
declLocation.filePath.wFileName() + L"<" +
declLocation.filePath.fileName() + L"<" +
std::to_wstring(declLocation.startLineNumber) + L":" +
std::to_wstring(declLocation.startColumnNumber) + L">";
m_client->recordLocalSymbol(name, getParseLocation(d->getLocation()));
@@ -575,7 +575,7 @@ void CxxAstVisitorComponentIndexer::visitDeclRefExpr(clang::DeclRefExpr* s)
(clang::isa<clang::VarDecl>(decl) && decl->getParentFunctionOrMethod() != NULL)
) {
ParseLocation declLocation = getParseLocation(decl->getLocation());
std::wstring name = declLocation.filePath.wFileName() + L"<" +
std::wstring name = declLocation.filePath.fileName() + L"<" +
std::to_wstring(declLocation.startLineNumber) + L":" +
std::to_wstring(declLocation.startColumnNumber) + L">";
@@ -438,7 +438,7 @@ std::wstring CxxDeclNameResolver::getTranslationUnitMainFileName(const clang::De
if (fileId.isValid())
{
const clang::FileEntry* fileEntry = sourceManager.getFileEntryForID(fileId);
return getCanonicalFilePathCache()->getCanonicalFilePath(fileEntry).wFileName();
return getCanonicalFilePathCache()->getCanonicalFilePath(fileEntry).fileName();
}
return L"";
}
@@ -449,9 +449,9 @@ std::wstring CxxDeclNameResolver::getDeclarationFileName(const clang::Decl* decl
const clang::FileEntry* fileEntry = sourceManager.getFileEntryForID(sourceManager.getFileID(declaration->getLocStart()));
if (fileEntry != nullptr && fileEntry->isValid())
{
return getCanonicalFilePathCache()->getCanonicalFilePath(fileEntry).wFileName();
return getCanonicalFilePathCache()->getCanonicalFilePath(fileEntry).fileName();
}
return getCanonicalFilePathCache()->getCanonicalFilePath(utility::decodeFromUtf8(sourceManager.getPresumedLoc(declaration->getLocStart()).getFilename())).wFileName();
return getCanonicalFilePathCache()->getCanonicalFilePath(utility::decodeFromUtf8(sourceManager.getPresumedLoc(declaration->getLocStart()).getFilename())).fileName();
}
std::wstring CxxDeclNameResolver::getNameForAnonymousSymbol(const std::wstring& symbolKindName, const clang::Decl* declaration)
+1 -1
View File
@@ -121,7 +121,7 @@ std::wstring utility::getFileNameOfFileEntry(const clang::FileEntry* entry)
}
else
{
fileName = FilePath(utility::decodeFromUtf8(entry->getName().str())).getParentDirectory().concatenate(FilePath(fileName).wFileName()).wstr();
fileName = FilePath(utility::decodeFromUtf8(entry->getName().str())).getParentDirectory().concatenate(FilePath(fileName).fileName()).wstr();
}
}
return fileName;
+1 -1
View File
@@ -28,7 +28,7 @@ bool QtApplication::event(QEvent *event)
FilePath path(fileEvent->file().toStdWString());
if (path.exists() && (path.extension() == ".srctrlprj" || path.extension() == ".coatiproject"))
if (path.exists() && (path.extension() == L".srctrlprj" || path.extension() == L".coatiproject"))
{
MessageLoadProject(path).dispatch();
return true;
+1 -1
View File
@@ -74,7 +74,7 @@ QtCodeField::QtCodeField(
LanguageType language = LANGUAGE_UNKNOWN;
if (!path.empty())
{
language = (path.extension() == ".java" ? LANGUAGE_JAVA : LANGUAGE_CPP);
language = (path.extension() == L".java" ? LANGUAGE_JAVA : LANGUAGE_CPP);
}
m_highlighter = new QtHighlighter(document(), language);
@@ -102,7 +102,7 @@ void QtCodeFileTitleButton::updateTexts()
return;
}
std::wstring title = m_filePath.wFileName();
std::wstring title = m_filePath.fileName();
std::wstring toolTip = L"file: " + m_filePath.wstr();
if ((!m_filePath.recheckExists()) ||
+2 -2
View File
@@ -83,7 +83,7 @@ QtCodeSnippet::QtCodeSnippet(const CodeSnippetParams& params, QtCodeNavigator* n
m_title = createScopeLine(layout);
if (m_titleId == 0) // title is a file path
{
m_title->setText(QString::fromStdWString(FilePath(m_titleString).wFileName()));
m_title->setText(QString::fromStdWString(FilePath(m_titleString).fileName()));
}
else
{
@@ -100,7 +100,7 @@ QtCodeSnippet::QtCodeSnippet(const CodeSnippetParams& params, QtCodeNavigator* n
m_footer = createScopeLine(layout);
if (m_footerId == 0) // footer is a file path
{
m_footer->setText(QString::fromStdWString(FilePath(m_footerString).wFileName()));
m_footer->setText(QString::fromStdWString(FilePath(m_footerString).fileName()));
}
else
{
+1 -1
View File
@@ -711,7 +711,7 @@ void QtMainWindow::updateRecentProjectMenu()
{
FilePath project = recentProjects[i];
m_recentProjectAction[i]->setVisible(true);
m_recentProjectAction[i]->setText(QString::fromStdWString(project.wFileName()));
m_recentProjectAction[i]->setText(QString::fromStdWString(project.fileName()));
m_recentProjectAction[i]->setData(QString::fromStdWString(project.wstr()));
}
else
+1 -1
View File
@@ -33,7 +33,7 @@ void QtRecentProjectButton::setProjectPath(const FilePath& projectFilePath)
{
m_projectFilePath = projectFilePath;
m_projectExists = projectFilePath.exists();
this->setText(QString::fromStdWString(m_projectFilePath.withoutExtension().wFileName()));
this->setText(QString::fromStdWString(m_projectFilePath.withoutExtension().fileName()));
if (m_projectExists)
{
this->setToolTip(m_projectFilePath.str().c_str());
@@ -74,7 +74,7 @@ void QtProjectWizzard::newProjectFromCDB(const FilePath& filePath)
if (m_projectSettings->getProjectFilePath().empty())
{
m_projectSettings->setProjectFilePath(filePath.withoutExtension().wFileName(), filePath.getParentDirectory());
m_projectSettings->setProjectFilePath(filePath.withoutExtension().fileName(), filePath.getParentDirectory());
}
if (!m_contentWidget)
@@ -103,7 +103,7 @@ void QtProjectWizzardContentPath::setHelpString(const QString& help)
m_helpString = help;
}
void QtProjectWizzardContentPath::setFileEndings(const std::set<std::string>& fileEndings)
void QtProjectWizzardContentPath::setFileEndings(const std::set<std::wstring>& fileEndings)
{
m_fileEndings = fileEndings;
}
@@ -122,7 +122,7 @@ QtProjectWizzardContentPathCDB::QtProjectWizzardContentPathCDB(
"<br />"
"You can make use of environment variables with ${ENV_VAR}."
);
setFileEndings({ ".json" });
setFileEndings({ L".json" });
}
void QtProjectWizzardContentPathCDB::populate(QGridLayout* layout, int& row)
@@ -179,7 +179,7 @@ QtProjectWizzardContentPathSourceMaven::QtProjectWizzardContentPathSourceMaven(
"<br />"
"You can make use of environment variables with ${ENV_VAR}."
);
setFileEndings({ ".xml" });
setFileEndings({ L".xml" });
}
void QtProjectWizzardContentPathSourceMaven::populate(QGridLayout* layout, int& row)
@@ -324,7 +324,7 @@ QtProjectWizzardContentPathSourceGradle::QtProjectWizzardContentPathSourceGradle
"<br />"
"You can make use of environment variables with ${ENV_VAR}."
);
setFileEndings({ ".gradle" });
setFileEndings({ L".gradle" });
}
void QtProjectWizzardContentPathSourceGradle::populate(QGridLayout* layout, int& row)
@@ -29,7 +29,7 @@ protected:
void setTitleString(const QString& title);
void setHelpString(const QString& help);
void setFileEndings(const std::set<std::string>& fileEndings);
void setFileEndings(const std::set<std::wstring>& fileEndings);
std::shared_ptr<SourceGroupSettings> m_settings;
@@ -40,7 +40,7 @@ protected:
private:
QString m_titleString;
QString m_helpString;
std::set<std::string> m_fileEndings;
std::set<std::wstring> m_fileEndings;
};
@@ -89,7 +89,7 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row)
m_colorSchemes = addComboBox("Color Scheme", "", layout, row);
for (size_t i = 0; i < m_colorSchemePaths.size(); i++)
{
m_colorSchemes->insertItem(i, QString::fromStdWString(m_colorSchemePaths[i].withoutExtension().wFileName()));
m_colorSchemes->insertItem(i, QString::fromStdWString(m_colorSchemePaths[i].withoutExtension().fileName()));
}
connect(m_colorSchemes, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &QtProjectWizzardContentPreferences::colorSchemeChanged);
+1 -1
View File
@@ -164,7 +164,7 @@ std::set<FilePath> SourceGroupJava::fetchRootDirectories() const
const std::vector<std::string> packageNameParts = utility::splitToVector(packageName, ".");
for (std::vector<std::string>::const_reverse_iterator it = packageNameParts.rbegin(); it != packageNameParts.rend(); it++)
{
if (rootPath.wFileName() != utility::decodeFromUtf8(*it))
if (rootPath.fileName() != utility::decodeFromUtf8(*it))
{
success = false;
break;
+6 -6
View File
@@ -118,14 +118,14 @@ public:
{
const FilePath path(L"data/FilePathTestSuite/abc.h");
TS_ASSERT_EQUALS(path.wFileName(), L"abc.h");
TS_ASSERT_EQUALS(path.fileName(), L"abc.h");
}
void test_file_path_extension()
{
const FilePath path(L"data/FilePathTestSuite/a.h");
TS_ASSERT_EQUALS(path.extension(), ".h");
TS_ASSERT_EQUALS(path.extension(), L".h");
}
void test_file_path_without_extension()
@@ -137,10 +137,10 @@ public:
void test_file_path_has_extension()
{
std::vector<std::string> extensions;
extensions.push_back(".h");
extensions.push_back(".cpp");
extensions.push_back(".cc");
std::vector<std::wstring> extensions;
extensions.push_back(L".h");
extensions.push_back(L".cpp");
extensions.push_back(L".cc");
TS_ASSERT(FilePath(L"data/FilePathTestSuite/a.h").hasExtension(extensions));
TS_ASSERT(FilePath(L"data/FilePathTestSuite/b.cpp").hasExtension(extensions));
+10 -10
View File
@@ -27,7 +27,7 @@ public:
const ParseLocation& location,
AccessKind access, DefinitionKind definitionKind) override
{
recordLine(symbolKindToString(symbolKind) + L" " + addLocationSuffix(addAccessPrefix(symbolName.getQualifiedNameWithSignature(), access) + L" [" + location.filePath.wFileName(), location) + L"]\n");
recordLine(symbolKindToString(symbolKind) + L" " + addLocationSuffix(addAccessPrefix(symbolName.getQualifiedNameWithSignature(), access) + L" [" + location.filePath.fileName(), location) + L"]\n");
return 0;
}
@@ -36,7 +36,7 @@ public:
const ParseLocation& location, const ParseLocation& scopeLocation,
AccessKind access, DefinitionKind definitionKind) override
{
recordLine(symbolKindToString(symbolKind) + L" " + addLocationSuffix(addAccessPrefix(symbolName.getQualifiedNameWithSignature(), access) + L" [" + location.filePath.wFileName(), location, scopeLocation) + L"]\n");
recordLine(symbolKindToString(symbolKind) + L" " + addLocationSuffix(addAccessPrefix(symbolName.getQualifiedNameWithSignature(), access) + L" [" + location.filePath.fileName(), location, scopeLocation) + L"]\n");
return 0;
}
@@ -49,7 +49,7 @@ public:
{
if (FilePath(referencedNameString).exists())
{
referencedNameString = FilePath(referencedNameString).wFileName();
referencedNameString = FilePath(referencedNameString).fileName();
}
}
catch (const boost::filesystem::filesystem_error& e)
@@ -62,7 +62,7 @@ public:
{
if (FilePath(contextNameString).exists())
{
contextNameString = FilePath(contextNameString).wFileName();
contextNameString = FilePath(contextNameString).fileName();
}
}
catch (const boost::filesystem::filesystem_error& e)
@@ -70,27 +70,27 @@ public:
// do nothing and use the old contectNameString
}
recordLine(referenceKindToString(referenceKind) + L" " + addLocationSuffix(contextNameString + L" -> " + referencedNameString + L" [" + location.filePath.wFileName(), location) + L"]\n");
recordLine(referenceKindToString(referenceKind) + L" " + addLocationSuffix(contextNameString + L" -> " + referencedNameString + L" [" + location.filePath.fileName(), location) + L"]\n");
}
void recordQualifierLocation(const NameHierarchy& qualifierName, const ParseLocation& location) override
{
recordLine(L"QUALIFIER: " + addLocationSuffix(qualifierName.getQualifiedNameWithSignature() + L" [" + location.filePath.wFileName(), location) + L"]\n");
recordLine(L"QUALIFIER: " + addLocationSuffix(qualifierName.getQualifiedNameWithSignature() + L" [" + location.filePath.fileName(), location) + L"]\n");
}
virtual void recordLocalSymbol(const std::wstring& name, const ParseLocation& location) override
{
recordLine(L"LOCAL_SYMBOL: " + addLocationSuffix(name + L" [" + location.filePath.wFileName(), location) + L"]\n");
recordLine(L"LOCAL_SYMBOL: " + addLocationSuffix(name + L" [" + location.filePath.fileName(), location) + L"]\n");
}
virtual void recordFile(const FileInfo& fileInfo) override
{
recordLine(L"FILE: " + fileInfo.path.wFileName() + L"\n");
recordLine(L"FILE: " + fileInfo.path.fileName() + L"\n");
}
virtual void recordComment(const ParseLocation& location) override
{
recordLine(L"COMMENT: " + addLocationSuffix(L"comment [" + location.filePath.wFileName(), location) + L"]\n");
recordLine(L"COMMENT: " + addLocationSuffix(L"comment [" + location.filePath.fileName(), location) + L"]\n");
}
std::wstring m_lines;
@@ -99,7 +99,7 @@ private:
virtual void doRecordError(const ParseLocation& location, const std::wstring& message,
bool fatal, bool indexed) override
{
recordLine(L"ERROR: " + addLocationSuffix(message + L" [" + location.filePath.wFileName(), location) + L"]\n");
recordLine(L"ERROR: " + addLocationSuffix(message + L" [" + location.filePath.fileName(), location) + L"]\n");
}
void recordLine(const std::wstring& message)