mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-28 06:53:29 +00:00
- backend update from GZDoom
This commit is contained in:
parent
d2b209261d
commit
30e9cb7e75
3 changed files with 14 additions and 2 deletions
|
@ -40,6 +40,9 @@
|
|||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <fnmatch.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -667,6 +667,8 @@ PClass *PClass::FindClassTentative(FName name)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool ShouldAllowGameSpecificVirtual(FName name, unsigned index, PType* arg, PType* varg);
|
||||
|
||||
int PClass::FindVirtualIndex(FName name, PFunction::Variant *variant, PFunction *parentfunc, bool exactReturnType, bool ignorePointerReadOnly)
|
||||
{
|
||||
auto proto = variant->Proto;
|
||||
|
@ -698,7 +700,7 @@ int PClass::FindVirtualIndex(FName name, PFunction::Variant *variant, PFunction
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if(!ShouldAllowGameSpecificVirtual(name, a, proto->ArgumentTypes[a], vproto->ArgumentTypes[a]))
|
||||
{
|
||||
fail = true;
|
||||
break;
|
||||
|
|
|
@ -12564,7 +12564,14 @@ FxExpression *FxLocalVariableDeclaration::Resolve(FCompileContext &ctx)
|
|||
{
|
||||
if (Init->IsStruct())
|
||||
{
|
||||
ValueType = NewPointer(ValueType);
|
||||
bool writable = true;
|
||||
|
||||
if(ctx.Version >= MakeVersion(4, 12, 0))
|
||||
{
|
||||
Init->RequestAddress(ctx, &writable);
|
||||
}
|
||||
|
||||
ValueType = NewPointer(ValueType, !writable);
|
||||
Init = new FxTypeCast(Init, ValueType, false);
|
||||
SAFE_RESOLVE(Init, ctx);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue