mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-06-07 16:23:02 +00:00
Remove Win32 byte types from ArchiveFile
This commit is contained in:
parent
88ffcab9a1
commit
e4cc79387a
|
|
@ -122,7 +122,7 @@ byteArray ArchiveFile::getFile(const std::wstring &filename)
|
|||
memcpy( out.data, m_cachedData + data->ptr, data->filesize );
|
||||
#else
|
||||
const unsigned int fileSize = static_cast<unsigned int>(data->filesize);
|
||||
PBYTE pbData = new BYTE[fileSize == 0 ? 1 : fileSize];
|
||||
uint8_t *pbData = new uint8_t[fileSize == 0 ? 1 : fileSize];
|
||||
out = byteArray(pbData, fileSize);
|
||||
const PortableFileIO::BinaryReadResult readResult = PortableFileIO::ReadBinaryFileSegment(
|
||||
m_sourcefile.getPath(),
|
||||
|
|
@ -151,7 +151,7 @@ byteArray ArchiveFile::getFile(const std::wstring &filename)
|
|||
unsigned int decompressedSize = dis.readInt();
|
||||
dis.close();
|
||||
|
||||
PBYTE uncompressedBuffer = new BYTE[decompressedSize];
|
||||
uint8_t *uncompressedBuffer = new uint8_t[decompressedSize];
|
||||
Compression::getCompression()->Decompress(uncompressedBuffer, &decompressedSize, out.data+4, out.length-4);
|
||||
|
||||
delete [] out.data;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
|
|
@ -12,7 +13,7 @@ class ArchiveFile
|
|||
{
|
||||
protected:
|
||||
File m_sourcefile;
|
||||
BYTE *m_cachedData;
|
||||
uint8_t *m_cachedData;
|
||||
|
||||
typedef struct _MetaData
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue