mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-07 21:38:01 -05:00
fix: linux build
This commit is contained in:
parent
b92e85dc14
commit
35cb6636a1
@ -2,6 +2,9 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
const void* ContentLoaderBase::PTR_FOLLOWING = reinterpret_cast<void*>(-1);
|
||||
const void* ContentLoaderBase::PTR_INSERT = reinterpret_cast<void*>(-2);
|
||||
|
||||
ContentLoaderBase::ContentLoaderBase(Zone& zone)
|
||||
: varXString(nullptr),
|
||||
m_zone(zone),
|
||||
|
@ -6,8 +6,8 @@
|
||||
class ContentLoaderBase
|
||||
{
|
||||
protected:
|
||||
static constexpr auto PTR_FOLLOWING = reinterpret_cast<void*>(-1);
|
||||
static constexpr auto PTR_INSERT = reinterpret_cast<void*>(-2);
|
||||
static const void* PTR_FOLLOWING;
|
||||
static const void* PTR_INSERT;
|
||||
|
||||
public:
|
||||
virtual ~ContentLoaderBase() = default;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
class IHashProvider
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
class ILoadingStream
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
class ProcessorAuthedBlocks final : public StreamProcessor
|
||||
@ -49,7 +50,7 @@ public:
|
||||
sizeToWrite = std::min(sizeToWrite, m_current_chunk_size - m_current_chunk_offset);
|
||||
|
||||
assert(length - loadedSize >= sizeToWrite);
|
||||
memcpy(&static_cast<uint8_t*>(buffer)[loadedSize], &m_chunk_buffer[m_current_chunk_offset], sizeToWrite);
|
||||
std::memcpy(&static_cast<uint8_t*>(buffer)[loadedSize], &m_chunk_buffer[m_current_chunk_offset], sizeToWrite);
|
||||
loadedSize += sizeToWrite;
|
||||
m_current_chunk_offset += sizeToWrite;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -25,7 +26,7 @@ namespace
|
||||
|
||||
auto loadedSize = m_base_stream->Load(&m_data[m_captured_data_size], dataToCapture);
|
||||
assert(length >= loadedSize);
|
||||
memcpy(buffer, &m_data[m_captured_data_size], loadedSize);
|
||||
std::memcpy(buffer, &m_data[m_captured_data_size], loadedSize);
|
||||
|
||||
m_captured_data_size += loadedSize;
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <condition_variable>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
@ -164,14 +165,14 @@ namespace
|
||||
if (sizeToRead > bytesLeftInCurrentChunk)
|
||||
{
|
||||
assert(sizeToRead >= bytesLeftInCurrentChunk);
|
||||
memcpy(bufferPos, &m_current_chunk[m_current_chunk_offset], bytesLeftInCurrentChunk);
|
||||
std::memcpy(bufferPos, &m_current_chunk[m_current_chunk_offset], bytesLeftInCurrentChunk);
|
||||
loadedSize += bytesLeftInCurrentChunk;
|
||||
|
||||
NextStream();
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(bufferPos, &m_current_chunk[m_current_chunk_offset], sizeToRead);
|
||||
std::memcpy(bufferPos, &m_current_chunk[m_current_chunk_offset], sizeToRead);
|
||||
loadedSize += sizeToRead;
|
||||
m_current_chunk_offset += sizeToRead;
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "Loading/Exception/InvalidHashException.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
namespace
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "Utils/Alignment.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <stack>
|
||||
|
||||
namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user