Add more C++20 fixes.

This commit is contained in:
David Anderson
2026-09-01 18:58:42 -07:00
parent 704f64f467
commit 001ea29ee8
5 changed files with 13 additions and 6 deletions
+4
View File
@@ -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']
+5 -5
View File
@@ -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();
}
+2
View File
@@ -29,6 +29,8 @@
* Version: $Id$
*/
#include <inttypes.h>
#include "extension.h"
#include "cookie.h"
#include "menus.h"
+1
View File
@@ -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'),
+1 -1
View File
@@ -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