GH-1227 renam GZip functions to not collide with zlib macros
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
#include <zlib.h>
|
||||
#include <QByteArray>
|
||||
|
||||
bool GZip::decompress(const QByteArray &compressedBytes, QByteArray &uncompressedBytes)
|
||||
bool GZip::unzip(const QByteArray &compressedBytes, QByteArray &uncompressedBytes)
|
||||
{
|
||||
if (compressedBytes.size() == 0)
|
||||
{
|
||||
@ -59,7 +59,7 @@ bool GZip::decompress(const QByteArray &compressedBytes, QByteArray &uncompresse
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GZip::compress(const QByteArray &uncompressedBytes, QByteArray &compressedBytes)
|
||||
bool GZip::zip(const QByteArray &uncompressedBytes, QByteArray &compressedBytes)
|
||||
{
|
||||
if (uncompressedBytes.size() == 0)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
class MULTIMC_LOGIC_EXPORT GZip
|
||||
{
|
||||
public:
|
||||
static bool decompress(const QByteArray &compressedBytes, QByteArray &uncompressedBytes);
|
||||
static bool compress(const QByteArray &uncompressedBytes, QByteArray &compressedBytes);
|
||||
static bool unzip(const QByteArray &compressedBytes, QByteArray &uncompressedBytes);
|
||||
static bool zip(const QByteArray &uncompressedBytes, QByteArray &compressedBytes);
|
||||
};
|
||||
|
||||
|
@ -187,7 +187,7 @@ static int64_t read_long (nbt::value& parent, const char * name, const int64_t &
|
||||
void World::parseLevelDat(QByteArray data)
|
||||
{
|
||||
QByteArray output;
|
||||
is_valid = GZip::decompress(data, output);
|
||||
is_valid = GZip::unzip(data, output);
|
||||
if(!is_valid)
|
||||
{
|
||||
return;
|
||||
|
Reference in New Issue
Block a user