mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-10-21 00:10:53 +00:00
Putting miniz into its own C++ namespace to fix clashes
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#define BASISU_CATCH_EXCEPTIONS 0
|
||||
|
||||
using namespace basisu;
|
||||
using namespace buminiz;
|
||||
|
||||
#define BASISU_TOOL_VERSION "1.13"
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#define MINIZ_NO_ZLIB_APIS
|
||||
#include "basisu_miniz.h"
|
||||
|
||||
using namespace buminiz;
|
||||
|
||||
#define BASISU_USE_STB_IMAGE_RESIZE_FOR_MIPMAP_GEN 0
|
||||
#define DEBUG_CROP_TEXTURE_TO_64x64 (0)
|
||||
#define DEBUG_RESIZE_TEXTURE (0)
|
||||
|
||||
@@ -81,9 +81,7 @@
|
||||
#define MINIZ_HAS_64BIT_REGISTERS 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
namespace buminiz {
|
||||
|
||||
// ------------------- zlib-style API Definitions.
|
||||
|
||||
@@ -588,9 +586,7 @@ mz_uint32 tdefl_get_adler32(tdefl_compressor *d);
|
||||
mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy);
|
||||
#endif // #ifndef MINIZ_NO_ZLIB_APIS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
} // namespace buminiz
|
||||
|
||||
#endif // MINIZ_HEADER_INCLUDED
|
||||
|
||||
@@ -598,6 +594,8 @@ mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int
|
||||
|
||||
#ifndef MINIZ_HEADER_FILE_ONLY
|
||||
|
||||
namespace buminiz {
|
||||
|
||||
typedef unsigned char mz_validate_uint16[sizeof(mz_uint16)==2 ? 1 : -1];
|
||||
typedef unsigned char mz_validate_uint32[sizeof(mz_uint32)==4 ? 1 : -1];
|
||||
typedef unsigned char mz_validate_uint64[sizeof(mz_uint64)==8 ? 1 : -1];
|
||||
@@ -637,10 +635,6 @@ typedef unsigned char mz_validate_uint64[sizeof(mz_uint64)==8 ? 1 : -1];
|
||||
#define MZ_FORCEINLINE inline
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// ------------------- zlib-style API's
|
||||
|
||||
mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len)
|
||||
@@ -2507,9 +2501,7 @@ void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h,
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
} // namespace buminiz
|
||||
|
||||
#endif // MINIZ_HEADER_FILE_ONLY
|
||||
|
||||
|
||||
Reference in New Issue
Block a user