More rework to switch to std::filesystem::path over cstrings

This commit is contained in:
Georg Hagen
2025-02-09 20:26:36 +01:00
parent 23ba703471
commit d2c86ede73
5 changed files with 40 additions and 8 deletions

View File

@@ -7,6 +7,7 @@
#include "ArchiveConfiguration.hpp"
#include "Base/Utils.hpp"
#include <archive.h>
#include <filesystem>
namespace OpenVulkano
{
@@ -34,9 +35,9 @@ namespace OpenVulkano
return std::string(tName);
}
ArchiveConfiguration ArchiveConfiguration::FromFileName(const char* fileName)
ArchiveConfiguration ArchiveConfiguration::FromFileName(std::filesystem::path fileName)
{
std::string_view fName = fileName;
std::string_view fName = fileName.string();
ArchiveConfiguration ac;
if (auto type = ArchiveType::FromExtension(fName))
{
@@ -77,4 +78,4 @@ namespace OpenVulkano
{
return COMP_MAP[static_cast<int>(compression)];
}
}
}