diff --git a/rehlds/engine/delta.cpp b/rehlds/engine/delta.cpp index 0d68d66..d092639 100644 --- a/rehlds/engine/delta.cpp +++ b/rehlds/engine/delta.cpp @@ -39,7 +39,7 @@ typedef struct delta_link_s typedef struct delta_definition_s { char *fieldName; - int fieldOffset; + size_t fieldOffset; } delta_definition_t; typedef struct delta_definition_list_s diff --git a/rehlds/engine/delta_jit.cpp b/rehlds/engine/delta_jit.cpp index 3455820..f2e4944 100644 --- a/rehlds/engine/delta_jit.cpp +++ b/rehlds/engine/delta_jit.cpp @@ -127,7 +127,7 @@ void DELTAJIT_CreateDescription(delta_t* delta, deltajitdata_t &jitdesc) { class CUniqueLabel { public: CUniqueLabel(const char* name) : m_name(name) { - m_name += m_unique_index++; + m_name += std::to_string(m_unique_index++); } operator std::string&() { diff --git a/rehlds/engine/mathlib.cpp b/rehlds/engine/mathlib.cpp index efbd2fb..fe2c7db 100644 --- a/rehlds/engine/mathlib.cpp +++ b/rehlds/engine/mathlib.cpp @@ -44,10 +44,10 @@ typedef ALIGN16 unsigned int aivec4_t[4]; // conversion multiplier const avec4_t deg2rad = { - M_PI / 180.f, - M_PI / 180.f, - M_PI / 180.f, - M_PI / 180.f + (float)M_PI / 180.f, + (float)M_PI / 180.f, + (float)M_PI / 180.f, + (float)M_PI / 180.f }; const aivec4_t negmask[4] = diff --git a/rehlds/hookers/6132_hooker.cpp b/rehlds/hookers/6132_hooker.cpp index 3d55d23..a39c5f4 100644 --- a/rehlds/hookers/6132_hooker.cpp +++ b/rehlds/hookers/6132_hooker.cpp @@ -2282,7 +2282,7 @@ AddressRef g_DataRefs[] = { 0x0208E828, "g_rgRconFailures", (size_t)&pg_rgRconFailures }, { 0x01E42FF8, "scr_downloading", (size_t)&pscr_downloading }, - +#ifndef REHLDS_FIXES { 0x0208F7B8, "g_bCS_CZ_Flags_Initialized", (size_t)&pg_bCS_CZ_Flags_Initialized }, { 0x0208F7AC, "g_bIsCZero", (size_t)&pg_bIsCZero }, { 0x0208F7B4, "g_bIsCZeroRitual", (size_t)&pg_bIsCZeroRitual }, @@ -2290,7 +2290,7 @@ AddressRef g_DataRefs[] = { 0x0208F7BC, "g_bIsTFC", (size_t)&pg_bIsTFC }, { 0x0208F7C0, "g_bIsHL1", (size_t)&pg_bIsHL1 }, { 0x0208F7A8, "g_bIsCStrike", (size_t)&pg_bIsCStrike }, - +#endif { 0x01FD3E80, "gPAS", (size_t)&pgPAS }, { 0x01FD3E84, "gPVS", (size_t)&pgPVS }, { 0x01FD3A78, "gPVSRowBytes", (size_t)&pgPVSRowBytes }, diff --git a/rehlds/unittests/delta_tests.cpp b/rehlds/unittests/delta_tests.cpp index 500265f..ca608b0 100644 --- a/rehlds/unittests/delta_tests.cpp +++ b/rehlds/unittests/delta_tests.cpp @@ -52,7 +52,7 @@ NOINLINE void _InitDeltaField(delta_description_t* fieldDesc, int expectedOffset memset(&fieldDesc->stats, 0, sizeof(fieldDesc->stats)); } -NOINLINE void _FillTestDelta(delta_test_struct_t* data, char val) { +NOINLINE void _FillTestDelta(delta_test_struct_t* data, unsigned char val) { memset(data, val, sizeof(delta_test_struct_t)); data->s_24[ARRAYSIZE(data->s_24) - 1] = 0; data->s_53[ARRAYSIZE(data->s_53) - 1] = 0; diff --git a/rehlds/unittests/unicode_tests.cpp b/rehlds/unittests/unicode_tests.cpp index 9b8e158..2e5353b 100644 --- a/rehlds/unittests/unicode_tests.cpp +++ b/rehlds/unittests/unicode_tests.cpp @@ -84,13 +84,13 @@ TEST(UnicodeValidateAndRepair, UNICODE_STRTOOLS, 1000) struct testdata_t { uint8 indata[16]; uint8 outdata[16]; - bool valid; + qboolean valid; }; testdata_t testData[] = { - { { 0x61, 0x62, 0 }, { 0x61, 0x62, 0 }, true }, - { { 0x61, 0x81, 0x62, 0 }, { 0x61, 0x62, 0 }, false }, - { { 0x81, 0 }, { 0 }, false }, + { { 0x61, 0x62, 0 }, { 0x61, 0x62, 0 }, TRUE }, + { { 0x61, 0x81, 0x62, 0 }, { 0x61, 0x62, 0 }, FALSE }, + { { 0x81, 0 }, { 0 }, FALSE }, }; for (int i = 0; i < ARRAYSIZE(testData); i++) { @@ -99,7 +99,7 @@ TEST(UnicodeValidateAndRepair, UNICODE_STRTOOLS, 1000) char localbuf[256]; strcpy(localbuf, (char*) d->indata); - bool valid = Q_UnicodeValidate(localbuf); + qboolean valid = Q_UnicodeValidate(localbuf); CHECK("UnicodeValidate: invalid result", valid == d->valid); Q_UnicodeRepair(localbuf);