Fix Apple build issues

This commit is contained in:
2021-02-28 11:12:13 +01:00
parent 6394a94bfe
commit 68d2feeba5
3 changed files with 7 additions and 7 deletions

View File

@@ -36,7 +36,7 @@ namespace openVulkanoCpp
ArchiveReader::ArchiveReader(const void* archiveBuffer, const size_t size, const std::shared_ptr<spdlog::logger>& logger)
: ArchiveReader(logger)
{
Open(archiveBuffer, size);
OpenMemory(archiveBuffer, size);
}
ArchiveReader::~ArchiveReader() = default;
@@ -62,7 +62,7 @@ namespace openVulkanoCpp
return Open(archiveFile.c_str());
}
bool ArchiveReader::Open(const void* archiveBuffer, size_t size)
bool ArchiveReader::OpenMemory(const void* archiveBuffer, size_t size)
{
PrepOpen();
ChkErr(archive_read_open_memory(m_archive, archiveBuffer, size));
@@ -85,7 +85,7 @@ namespace openVulkanoCpp
std::vector<std::string> files;
std::regex fileRegex(fileNamePattern);
for(auto const& dirEntry : std::filesystem::directory_iterator(dir))
for(const std::filesystem::directory_entry& dirEntry : std::filesystem::directory_iterator(dir))
{
std::string entryPath = dirEntry.path().string();
if (std::regex_match(entryPath, fileRegex))
@@ -244,7 +244,7 @@ namespace openVulkanoCpp
{
const void *buffer;
size_t size;
ssize_t offset, r;
int64_t offset, r;
while ((r = archive_read_data_block(m_archive, &buffer, &size, &offset)) != ARCHIVE_EOF)
{
ChkErr(r);

View File

@@ -35,7 +35,7 @@ namespace openVulkanoCpp
bool Open(const std::string& archiveFile);
bool Open(const void* archiveBuffer, size_t size);
bool OpenMemory(const void* archiveBuffer, size_t size);
bool Open(const std::vector<std::string>& archiveFiles);

View File

@@ -55,7 +55,7 @@ namespace openVulkanoCpp
{
const void* buffer;
size_t size;
ssize_t offset, r;
int64_t offset, r;
while (true)
{
@@ -93,7 +93,7 @@ namespace openVulkanoCpp
struct archive* m_archive;
char* m_buffer;
size_t m_currentBlockSize;
ssize_t offset, r;
int64_t offset, r;
bool ReadNextBlock()
{