From 38b86ad83c53994bedaea79fd1a571204f37344c Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Sun, 5 Mar 2017 02:48:36 +0200 Subject: [PATCH] No need for explicit EFX_Self check in FxStructMember::RequestAddress if self is set to readonly elsewhere. --- src/scripting/backend/codegen.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/scripting/backend/codegen.cpp b/src/scripting/backend/codegen.cpp index 859b5b4c1..bcaa374c2 100644 --- a/src/scripting/backend/codegen.cpp +++ b/src/scripting/backend/codegen.cpp @@ -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(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) {