mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-23 04:11:53 +00:00
No need for explicit EFX_Self check in FxStructMember::RequestAddress if self is set to readonly elsewhere.
This commit is contained in:
parent
1832531726
commit
38b86ad83c
1 changed files with 0 additions and 6 deletions
|
@ -6841,12 +6841,6 @@ bool FxStructMember::RequestAddress(FCompileContext &ctx, bool *writable)
|
|||
// [ZZ] original check.
|
||||
bool bWritable = (AddressWritable && !ctx.CheckWritable(membervar->Flags) &&
|
||||
(!classx->ValueType->IsKindOf(RUNTIME_CLASS(PPointer)) || !static_cast<PPointer*>(classx->ValueType)->IsConst));
|
||||
// [ZZ] self in a const function is not writable.
|
||||
if (bWritable) // don't do complex checks on early fail
|
||||
{
|
||||
if ((classx->ExprType == EFX_Self) && (ctx.Function && (ctx.Function->Variants[0].Flags & VARF_ReadOnly)))
|
||||
bWritable = false;
|
||||
}
|
||||
// [ZZ] implement write barrier between different scopes
|
||||
if (bWritable)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue