Skip to content

Commit fb7997f

Browse files
committed
externals: Update submodules
gui: fixes
1 parent f50c582 commit fb7997f

24 files changed

+460
-276
lines changed

.clang-format

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ AlignTrailingComments: true
88
BreakBeforeBinaryOperators: All
99
AlignOperands: true
1010
AllowShortCaseLabelsOnASingleLine: true
11+
SortIncludes: false

externals/catch

Submodule catch updated 314 files

externals/cereal

Submodule cereal updated 139 files

externals/flac

Submodule flac updated 158 files

externals/glm

Submodule glm updated 1248 files

externals/imgui

Submodule imgui updated 71 files

externals/json

Submodule json updated 231 files

externals/miniz/miniz.c

100755100644
+15-9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "miniz.h"
12
/**************************************************************************
23
*
34
* Copyright 2013-2014 RAD Game Tools and Valve Software
@@ -24,7 +25,7 @@
2425
*
2526
**************************************************************************/
2627

27-
#include "miniz.h"
28+
2829

2930
typedef unsigned char mz_validate_uint16[sizeof(mz_uint16) == 2 ? 1 : -1];
3031
typedef unsigned char mz_validate_uint32[sizeof(mz_uint32) == 4 ? 1 : -1];
@@ -82,6 +83,12 @@ mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len)
8283
}
8384
return ~crcu32;
8485
}
86+
#elif defined(USE_EXTERNAL_MZCRC)
87+
/* If USE_EXTERNAL_CRC is defined, an external module will export the
88+
* mz_crc32() symbol for us to use, e.g. an SSE-accelerated version.
89+
* Depending on the impl, it may be necessary to ~ the input/output crc values.
90+
*/
91+
mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len);
8592
#else
8693
/* Faster, but larger CPU cache footprint.
8794
*/
@@ -157,17 +164,17 @@ void mz_free(void *p)
157164
MZ_FREE(p);
158165
}
159166

160-
void *miniz_def_alloc_func(void *opaque, size_t items, size_t size)
167+
MINIZ_EXPORT void *miniz_def_alloc_func(void *opaque, size_t items, size_t size)
161168
{
162169
(void)opaque, (void)items, (void)size;
163170
return MZ_MALLOC(items * size);
164171
}
165-
void miniz_def_free_func(void *opaque, void *address)
172+
MINIZ_EXPORT void miniz_def_free_func(void *opaque, void *address)
166173
{
167174
(void)opaque, (void)address;
168175
MZ_FREE(address);
169176
}
170-
void *miniz_def_realloc_func(void *opaque, void *address, size_t items, size_t size)
177+
MINIZ_EXPORT void *miniz_def_realloc_func(void *opaque, void *address, size_t items, size_t size)
171178
{
172179
(void)opaque, (void)address, (void)items, (void)size;
173180
return MZ_REALLOC(address, items * size);
@@ -654,7 +661,6 @@ const char *mz_error(int err)
654661

655662

656663

657-
658664
#ifdef __cplusplus
659665
extern "C" {
660666
#endif
@@ -2205,7 +2211,7 @@ void tdefl_compressor_free(tdefl_compressor *pComp)
22052211
#ifdef __cplusplus
22062212
}
22072213
#endif
2208-
/**************************************************************************
2214+
/**************************************************************************
22092215
*
22102216
* Copyright 2013-2014 RAD Game Tools and Valve Software
22112217
* Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC
@@ -2945,7 +2951,7 @@ void tinfl_decompressor_free(tinfl_decompressor *pDecomp)
29452951
#ifdef __cplusplus
29462952
}
29472953
#endif
2948-
/**************************************************************************
2954+
/**************************************************************************
29492955
*
29502956
* Copyright 2013-2014 RAD Game Tools and Valve Software
29512957
* Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC
@@ -3044,7 +3050,7 @@ static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStream)
30443050
#define MZ_FFLUSH fflush
30453051
#define MZ_FREOPEN(f, m, s) freopen(f, m, s)
30463052
#define MZ_DELETE_FILE remove
3047-
#elif defined(__GNUC__) && defined(_LARGEFILE64_SOURCE)
3053+
#elif defined(__USE_LARGEFILE64) // gcc, clang
30483054
#ifndef MINIZ_NO_TIME
30493055
#include <utime.h>
30503056
#endif
@@ -4888,7 +4894,7 @@ mz_zip_reader_extract_iter_state* mz_zip_reader_extract_iter_new(mz_zip_archive
48884894
if (!((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!pState->file_stat.m_method)))
48894895
{
48904896
/* Decompression required, therefore intermediate read buffer required */
4891-
pState->read_buf_size = MZ_MIN(pState->file_stat.m_comp_size, MZ_ZIP_MAX_IO_BUF_SIZE);
4897+
pState->read_buf_size = MZ_MIN(pState->file_stat.m_comp_size, (mz_uint64)MZ_ZIP_MAX_IO_BUF_SIZE);
48924898
if (NULL == (pState->pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)pState->read_buf_size)))
48934899
{
48944900
mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);

0 commit comments

Comments
 (0)