mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 21:32:50 +00:00
update_manager: replace deprecated LookToRead2_Init nonsense with regular c++ default initializer
This commit is contained in:
parent
00a80adfae
commit
763744268d
@ -418,20 +418,16 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
|||||||
|
|
||||||
// 7z stuff (most of this stuff is from 7z Util sample and has been reworked to be more stl friendly)
|
// 7z stuff (most of this stuff is from 7z Util sample and has been reworked to be more stl friendly)
|
||||||
|
|
||||||
ISzAlloc allocImp;
|
|
||||||
ISzAlloc allocTempImp;
|
|
||||||
|
|
||||||
CFileInStream archiveStream{};
|
CFileInStream archiveStream{};
|
||||||
CLookToRead2 lookStream;
|
CLookToRead2 lookStream{};
|
||||||
CSzArEx db;
|
CSzArEx db;
|
||||||
SRes res;
|
|
||||||
UInt16 temp_u16[PATH_MAX];
|
UInt16 temp_u16[PATH_MAX];
|
||||||
u8 temp_u8[PATH_MAX];
|
u8 temp_u8[PATH_MAX];
|
||||||
const usz kInputBufSize = static_cast<usz>(1u << 18u);
|
const usz kInputBufSize = static_cast<usz>(1u << 18u);
|
||||||
const ISzAlloc g_Alloc = {SzAlloc, SzFree};
|
const ISzAlloc g_Alloc = {SzAlloc, SzFree};
|
||||||
|
|
||||||
allocImp = g_Alloc;
|
ISzAlloc allocImp = g_Alloc;
|
||||||
allocTempImp = g_Alloc;
|
ISzAlloc allocTempImp = g_Alloc;
|
||||||
|
|
||||||
if (InFile_Open(&archiveStream.file, tmpfile_path.c_str()))
|
if (InFile_Open(&archiveStream.file, tmpfile_path.c_str()))
|
||||||
{
|
{
|
||||||
@ -441,9 +437,8 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
|||||||
|
|
||||||
FileInStream_CreateVTable(&archiveStream);
|
FileInStream_CreateVTable(&archiveStream);
|
||||||
LookToRead2_CreateVTable(&lookStream, False);
|
LookToRead2_CreateVTable(&lookStream, False);
|
||||||
lookStream.buf = nullptr;
|
|
||||||
|
|
||||||
res = SZ_OK;
|
SRes res = SZ_OK;
|
||||||
{
|
{
|
||||||
lookStream.buf = static_cast<Byte*>(ISzAlloc_Alloc(&allocImp, kInputBufSize));
|
lookStream.buf = static_cast<Byte*>(ISzAlloc_Alloc(&allocImp, kInputBufSize));
|
||||||
if (!lookStream.buf)
|
if (!lookStream.buf)
|
||||||
@ -452,7 +447,6 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
|||||||
{
|
{
|
||||||
lookStream.bufSize = kInputBufSize;
|
lookStream.bufSize = kInputBufSize;
|
||||||
lookStream.realStream = &archiveStream.vt;
|
lookStream.realStream = &archiveStream.vt;
|
||||||
LookToRead2_Init(&lookStream)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -489,8 +483,8 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
UInt32 blockIndex = 0xFFFFFFFF;
|
UInt32 blockIndex = 0xFFFFFFFF;
|
||||||
Byte* outBuffer = nullptr;
|
Byte* outBuffer = nullptr;
|
||||||
usz outBufferSize = 0;
|
usz outBufferSize = 0;
|
||||||
|
|
||||||
// Creates temp folder for moving active files
|
// Creates temp folder for moving active files
|
||||||
@ -501,9 +495,8 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
|||||||
{
|
{
|
||||||
usz offset = 0;
|
usz offset = 0;
|
||||||
usz outSizeProcessed = 0;
|
usz outSizeProcessed = 0;
|
||||||
usz len;
|
const bool isDir = SzArEx_IsDir(&db, i);
|
||||||
unsigned isDir = SzArEx_IsDir(&db, i);
|
const usz len = SzArEx_GetFileNameUtf16(&db, i, nullptr);
|
||||||
len = SzArEx_GetFileNameUtf16(&db, i, nullptr);
|
|
||||||
|
|
||||||
if (len >= PATH_MAX)
|
if (len >= PATH_MAX)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user