From 9901b811a06116d2d2bf6a20f3ffa329dd78c23e Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Fri, 2 Jan 2015 06:59:10 +0100 Subject: [PATCH] fix, deprecated switch noBoundCheck still read but wont be written anymore to project file --- src/ce_dmdwrap.pas | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ce_dmdwrap.pas b/src/ce_dmdwrap.pas index b2621c57..9fa9ebc9 100644 --- a/src/ce_dmdwrap.pas +++ b/src/ce_dmdwrap.pas @@ -149,7 +149,7 @@ type property targetKind: TTargetSystem read fTrgKind write setTrgKind default auto; property binaryKind: TBinaryKind read fBinKind write setBinKind default executable; property inlining: boolean read fInline write setInline default false; - property noBoundsCheck: boolean read fNoBounds write setNoBounds; + property noBoundsCheck: boolean read fNoBounds write setNoBounds stored false default false; property boundsCheck: TBoundCheckKind read fBoundsCheck write setBoundsCheck default safeOnly; property optimizations: boolean read fOptimz write setOptims default false; property generateStackFrame: boolean read fGenStack write setGenStack default false; @@ -556,11 +556,9 @@ end; procedure TOutputOpts.depPatch; begin // patch deprecated fields - if fNoBounds then - begin - fNoBounds := false; - fBoundsCheck := offAlways; - end; + if fNoBounds then setBoundsCheck(offAlways) + else setBoundsCheck(onAlways); + fNoBounds := false; end; procedure TOutputOpts.getOpts(const aList: TStrings); @@ -675,13 +673,14 @@ procedure TOutputOpts.setBoundsCheck(const aValue: TBoundCheckKind); begin if fBoundsCheck = aValue then exit; fBoundsCheck := aValue; - depPatch; + doChanged; end; procedure TOutputOpts.setNoBounds(const aValue: boolean); begin if fNoBounds = aValue then exit; fNoBounds := aValue; + depPatch; doChanged; end;