mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-07 02:18:30 +00:00
Backwards compat with outdated sourcehook.h
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40506
This commit is contained in:
parent
2cb3fa14bc
commit
93ead5a2e0
@ -96,7 +96,7 @@ namespace SourceHook
|
|||||||
{
|
{
|
||||||
if (p1->paramsPassInfo[i].type != p2->paramsPassInfo[i].type)
|
if (p1->paramsPassInfo[i].type != p2->paramsPassInfo[i].type)
|
||||||
return false;
|
return false;
|
||||||
if (p1->paramsPassInfo[i].flags != p2->paramsPassInfo[i].flags)
|
if (GetRealFlags(p1->paramsPassInfo[i]) != GetRealFlags(p2->paramsPassInfo[i]))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,9 +70,15 @@ namespace SourceHook
|
|||||||
return m_Proto;
|
return m_Proto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For old sourcehook.h: flags 0 -> assume ByVal
|
||||||
|
static unsigned int GetRealFlags(const PassInfo &info)
|
||||||
|
{
|
||||||
|
return (info.flags == 0) ? PassInfo::PassFlag_ByVal : info.flags;
|
||||||
|
}
|
||||||
|
|
||||||
static size_t GetRealSize(const PassInfo &info)
|
static size_t GetRealSize(const PassInfo &info)
|
||||||
{
|
{
|
||||||
if (info.flags & PassInfo::PassFlag_ByRef)
|
if (GetRealFlags(info) & PassInfo::PassFlag_ByRef)
|
||||||
{
|
{
|
||||||
return sizeof(void*);
|
return sizeof(void*);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user