Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for a failing assertion on x64 linux gcc builds and C++ 20 compatibility #44

Open
wants to merge 2 commits into
base: x86-64-branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions game/server/baseentity.h
Original file line number Diff line number Diff line change
Expand Up @@ -1095,15 +1095,7 @@ class CBaseEntity : public IServerEntity
// Ugly code to lookup all functions to make sure they are in the table when set.
#ifdef _DEBUG

#ifdef GNUC
#define ENTITYFUNCPTR_SIZE 8
#else
#ifdef PLATFORM_64BITS
#define ENTITYFUNCPTR_SIZE 8
#else
#define ENTITYFUNCPTR_SIZE 4
#endif
#endif
#define ENTITYFUNCPTR_SIZE sizeof(ENTITYFUNCPTR)

void FunctionCheck( void *pFunction, const char *name );
ENTITYFUNCPTR TouchSet( ENTITYFUNCPTR func, char *name )
Expand Down
2 changes: 1 addition & 1 deletion public/tier1/utlsymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class CUtlSymbolTable

inline bool HasElement(const char* pStr) const
{
return Find(pStr) != UTL_INVAL_SYMBOL;
return static_cast<UtlSymId_t>(Find(pStr)) != UTL_INVAL_SYMBOL;
}

// Remove all symbols in the table.
Expand Down