From 199bf233e8b290fcdd7b8acbbe988aae31c785e0 Mon Sep 17 00:00:00 2001 From: Project579 Date: Sat, 6 Aug 2022 20:47:48 +0200 Subject: [PATCH] essimporter: Don't use "std::string" to store paths. --- apps/essimporter/importer.cpp | 4 ++-- apps/essimporter/importer.hpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/essimporter/importer.cpp b/apps/essimporter/importer.cpp index f0c74a7333..fbb333740b 100644 --- a/apps/essimporter/importer.cpp +++ b/apps/essimporter/importer.cpp @@ -85,7 +85,7 @@ namespace namespace ESSImport { - Importer::Importer(const std::string &essfile, const std::string &outfile, const std::string &encoding) + Importer::Importer(const std::filesystem::path &essfile, const std::filesystem::path &outfile, const std::string &encoding) : mEssFile(essfile) , mOutFile(outfile) , mEncoding(encoding) @@ -112,7 +112,7 @@ namespace ESSImport std::vector mRecords; }; - void read(const std::string& filename, File& file) + void read(const std::filesystem::path &filename, File& file) { ESM::ESMReader esm; esm.open(filename); diff --git a/apps/essimporter/importer.hpp b/apps/essimporter/importer.hpp index ccacd7972d..9d114fad27 100644 --- a/apps/essimporter/importer.hpp +++ b/apps/essimporter/importer.hpp @@ -1,7 +1,7 @@ #ifndef OPENMW_ESSIMPORTER_IMPORTER_H #define OPENMW_ESSIMPORTER_IMPORTER_H -#include +#include namespace ESSImport { @@ -9,15 +9,15 @@ namespace ESSImport class Importer { public: - Importer(const std::string& essfile, const std::string& outfile, const std::string& encoding); + Importer(const std::filesystem::path &essfile, const std::filesystem::path &outfile, const std::string& encoding); void run(); void compare(); private: - std::string mEssFile; - std::string mOutFile; + std::filesystem::path mEssFile; + std::filesystem::path mOutFile; std::string mEncoding; };