diff --git a/AMBuildScript b/AMBuildScript index 032f6915..efe21c4e 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -329,6 +329,10 @@ class SMConfig(object): if cxx.version >= 'clang-16.0' or cxx.version >= 'apple-clang-15.0': cxx.cxxflags += ['-Wno-deprecated-anon-enum-enum-conversion'] + # C++20 deprecates volatile ++/-- and compound assignment (P1152R4). + if cxx.version >= 'clang-12.0' or cxx.version >= 'apple-clang-13.0': + cxx.cxxflags += ['-Wno-deprecated-volatile'] + if have_gcc: cxx.cflags += ['-Wno-maybe-uninitialized'] diff --git a/core/HalfLife2.cpp b/core/HalfLife2.cpp index aac46274..84109f75 100644 --- a/core/HalfLife2.cpp +++ b/core/HalfLife2.cpp @@ -1376,15 +1376,15 @@ public: void Purge() { - if (!IsExternallyAllocated()) + if (!this->IsExternallyAllocated()) { - if (m_pMemory) + if (this->m_pMemory) { UTLMEMORY_TRACK_FREE(); - g_pMemAlloc->Free((void*)m_pMemory); - m_pMemory = 0; + g_pMemAlloc->Free((void*)this->m_pMemory); + this->m_pMemory = 0; } - m_nAllocationCount = 0; + this->m_nAllocationCount = 0; } BaseClass::Purge(); } diff --git a/extensions/clientprefs/natives.cpp b/extensions/clientprefs/natives.cpp index 6bb5140f..7c71de94 100644 --- a/extensions/clientprefs/natives.cpp +++ b/extensions/clientprefs/natives.cpp @@ -29,6 +29,8 @@ * Version: $Id$ */ +#include + #include "extension.h" #include "cookie.h" #include "menus.h" diff --git a/extensions/dhooks/AMBuilder b/extensions/dhooks/AMBuilder index 3ea79871..4900ef68 100644 --- a/extensions/dhooks/AMBuilder +++ b/extensions/dhooks/AMBuilder @@ -24,6 +24,7 @@ for cxx in builder.targets: os.path.join(SM.mms_root, 'core', 'sourcehook'), os.path.join(builder.sourcePath, 'extensions', 'dhooks'), os.path.join(builder.sourcePath, 'public', 'jit'), + os.path.join(builder.sourcePath, 'sourcepawn'), os.path.join(builder.sourcePath, 'sourcepawn', 'include'), os.path.join(builder.sourcePath, 'sourcepawn', 'vm'), os.path.join(builder.sourcePath, 'extensions', 'dhooks', 'DynamicHooks'), diff --git a/tools/checkout-deps.sh b/tools/checkout-deps.sh index 87b772af..8fdc615d 100755 --- a/tools/checkout-deps.sh +++ b/tools/checkout-deps.sh @@ -137,7 +137,7 @@ origin= checkout if [ -z ${sdks+x} ]; then - sdks=( csgo hl2dm nucleardawn l4d2 dods l4d css tf2 insurgency sdk2013 doi ) + sdks=( csgo hl2dm nucleardawn l4d2 dods l4d css tf2 insurgency sdk2013 doi mcv ) if [ $ismac -eq 0 ]; then # Add these SDKs for Windows or Linux