mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
Fix "unknown pragma" on zlib clang workarounds
This commit is contained in:
parent
758902382d
commit
fa0bf6a92c
3 changed files with 16 additions and 1 deletions
|
@ -925,10 +925,14 @@ public:
|
|||
z_stream zs{};
|
||||
uLong zsz = compressBound(obj.getBufferSize()) + 256;
|
||||
auto zbuf = std::make_unique<uchar[]>(zsz);
|
||||
#ifndef _MSC_VER
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#endif
|
||||
deflateInit2(&zs, 9, Z_DEFLATED, 16 + 15, 9, Z_DEFAULT_STRATEGY);
|
||||
#ifndef _MSC_VER
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
zs.avail_in = static_cast<uInt>(obj.getBufferSize());
|
||||
zs.next_in = reinterpret_cast<uchar*>(const_cast<char*>(obj.getBufferStart()));
|
||||
zs.avail_out = static_cast<uInt>(zsz);
|
||||
|
@ -961,10 +965,14 @@ public:
|
|||
std::vector<uchar> gz = cached.to_vector<uchar>();
|
||||
std::vector<uchar> out;
|
||||
z_stream zs{};
|
||||
#ifndef _MSC_VER
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#endif
|
||||
inflateInit2(&zs, 16 + 15);
|
||||
#ifndef _MSC_VER
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
zs.avail_in = static_cast<uInt>(gz.size());
|
||||
zs.next_in = gz.data();
|
||||
out.resize(gz.size() * 6);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue