mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
Add missing NewPointer() function
This commit is contained in:
parent
5d2cbf4ecb
commit
1e7cce5a2c
1 changed files with 20 additions and 0 deletions
|
@ -1300,6 +1300,26 @@ void PPointer::GetTypeIDs(intptr_t &id1, intptr_t &id2) const
|
|||
id2 = 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// NewPointer
|
||||
//
|
||||
// Returns a PPointer to an object of the specified type
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
PPointer *NewPointer(PType *type)
|
||||
{
|
||||
size_t bucket;
|
||||
PType *ptype = TypeTable.FindType(RUNTIME_CLASS(PPointer), (intptr_t)type, 0, &bucket);
|
||||
if (ptype == NULL)
|
||||
{
|
||||
ptype = new PPointer(type);
|
||||
TypeTable.AddType(ptype, RUNTIME_CLASS(PPointer), (intptr_t)type, 0, bucket);
|
||||
}
|
||||
return static_cast<PPointer *>(ptype);
|
||||
}
|
||||
|
||||
|
||||
/* PClassPointer **********************************************************/
|
||||
|
||||
|
|
Loading…
Reference in a new issue