Another windows build fix

This commit is contained in:
Georg Hagen
2025-02-09 18:58:39 +01:00
parent 8bbb22bd64
commit 23ba703471

View File

@@ -70,9 +70,9 @@ namespace OpenVulkano
{
PrepOpen();
if constexpr (std::is_same_v<std::filesystem::path::value_type, char>)
ChkErr(archive_read_open_filename(m_archive, archiveFile.c_str(), BUFFER_SIZE));
ChkErr(archive_read_open_filename(m_archive, (const char*)archiveFile.c_str(), BUFFER_SIZE));
else
ChkErr(archive_read_open_filename_w(m_archive, (wchar_t*)archiveFile.c_str(), BUFFER_SIZE));
ChkErr(archive_read_open_filename_w(m_archive, (const wchar_t*)archiveFile.c_str(), BUFFER_SIZE));
ReadNextHeader();
return HasNext();
}
@@ -82,10 +82,7 @@ namespace OpenVulkano
{
if (archiveFile[0] == '\0')
{
if (m_logger)
{
m_logger->error("Unable to open archive file with an empty name!");
}
if (m_logger) m_logger->error("Unable to open archive file with an empty name!");
return false;
}
PrepOpen();
@@ -110,14 +107,14 @@ namespace OpenVulkano
bool ArchiveReader::Open(const std::vector<std::string>& archiveFiles)
{
if (archiveFiles.empty()) return false;
ArchiveConfiguration ac = ArchiveConfiguration::FromFileName(archiveFiles.front().c_str());
const ArchiveConfiguration ac = ArchiveConfiguration::FromFileName(archiveFiles.front().c_str());
if (ac.type == ArchiveType::TAR) // TODO handle all archive types correctly
{ // Queue based approach for all archive types that do not natively support split archives
for(const std::string& file : archiveFiles)
{
m_archivesToRead.push(file);
}
bool state = Open(m_archivesToRead.front());
const bool state = Open(m_archivesToRead.front());
m_archivesToRead.pop();
return state;
}