diff --git a/common/tracy_lz4.c b/common/tracy_lz4.cpp similarity index 99% rename from common/tracy_lz4.c rename to common/tracy_lz4.cpp index 50ca7322..bfa2b026 100755 --- a/common/tracy_lz4.c +++ b/common/tracy_lz4.cpp @@ -88,7 +88,7 @@ /*-************************************ * Dependency **************************************/ -#include "tracy_lz4.h" +#include "tracy_lz4.hpp" /* see also "memory routines" below */ @@ -141,7 +141,6 @@ * Basic Types **************************************/ #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# include typedef uint8_t BYTE; typedef uint16_t U16; typedef uint32_t U32; @@ -163,6 +162,9 @@ typedef size_t reg_t; /* 32-bits in x32 mode */ #endif +namespace tracy +{ + /*-************************************ * Reading and writing into memory **************************************/ @@ -1478,3 +1480,5 @@ int LZ4_decompress_fast_withPrefix64k(const char* source, char* dest, int origin } #endif /* LZ4_COMMONDEFS_ONLY */ + +} diff --git a/common/tracy_lz4.h b/common/tracy_lz4.hpp similarity index 99% rename from common/tracy_lz4.h rename to common/tracy_lz4.hpp index d284d630..86e138b4 100755 --- a/common/tracy_lz4.h +++ b/common/tracy_lz4.hpp @@ -32,16 +32,17 @@ - LZ4 homepage : http://www.lz4.org - LZ4 source repository : https://github.com/lz4/lz4 */ -#if defined (__cplusplus) -extern "C" { -#endif + #ifndef LZ4_H_2983827168210 #define LZ4_H_2983827168210 /* --- Dependency --- */ #include /* size_t */ +#include +namespace tracy +{ /** Introduction @@ -345,7 +346,6 @@ LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* source, char* dest, in #define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) /* required as macro for static allocation */ #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -#include typedef struct { uint32_t hashTable[LZ4_HASH_SIZE_U32]; @@ -467,9 +467,6 @@ LZ4LIB_API LZ4_DEPRECATED("use LZ4_saveDict() instead") char* LZ4_slideInput LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize); -#endif /* LZ4_H_2983827168210 */ - - -#if defined (__cplusplus) } -#endif + +#endif /* LZ4_H_2983827168210 */