diff --git a/components/synedit/lazsynedittext.pas b/components/synedit/lazsynedittext.pas index 8e2ac776d1..49c999b8d8 100644 --- a/components/synedit/lazsynedittext.pas +++ b/components/synedit/lazsynedittext.pas @@ -557,7 +557,6 @@ function TSynLogicalPhysicalConvertor.LogicalToPhysical(AIndex, ABytePos: Intege var AColOffset: Integer): Integer; var i: integer; - CharWidths: TPhysicalCharWidths; begin {$IFDEF AssertSynMemIndex} if (ABytePos <= 0) then diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp index 05ce0e2a7d..35feeafd39 100644 --- a/components/synedit/synedit.pp +++ b/components/synedit/synedit.pp @@ -876,12 +876,12 @@ type procedure ExecuteCommand(Command: TSynEditorCommand; const AChar: TUTF8Char; Data: pointer); virtual; - function GetHighlighterAttriAtRowCol(XY: TPoint; var Token: string; - var Attri: TSynHighlighterAttributes): boolean; - function GetHighlighterAttriAtRowColEx(XY: TPoint; var Token: string; - var TokenType, Start: Integer; - var Attri: TSynHighlighterAttributes): boolean; //L505 - procedure GetWordBoundsAtRowCol(const XY: TPoint; var StartX, EndX: integer); + function GetHighlighterAttriAtRowCol(XY: TPoint; out Token: string; + out Attri: TSynHighlighterAttributes): boolean; + function GetHighlighterAttriAtRowColEx(XY: TPoint; out Token: string; + out TokenType, Start: Integer; + out Attri: TSynHighlighterAttributes): boolean; //L505 + procedure GetWordBoundsAtRowCol(const XY: TPoint; out StartX, EndX: integer); function GetWordAtRowCol(XY: TPoint): string; function NextTokenPos: TPoint; virtual; deprecated; // use next word pos instead function NextWordPos: TPoint; virtual; @@ -2149,7 +2149,7 @@ end; destructor TCustomSynEdit.Destroy; var - q,i: integer; + i: integer; begin Application.RemoveOnIdleHandler(@IdleScanRanges); SurrenderPrimarySelection; @@ -7015,7 +7015,7 @@ end; procedure TCustomSynEdit.MoveCaretHorz(DX: integer); var NewCaret: TPoint; - s, a: String; + s: String; PhysicalLineLen: Integer; begin NewCaret:=Point(CaretX+DX,CaretY); @@ -7934,7 +7934,7 @@ end; //L505 begin function TCustomSynEdit.GetHighlighterAttriAtRowCol(XY: TPoint; - var Token: string; var Attri: TSynHighlighterAttributes): boolean; + out Token: string; out Attri: TSynHighlighterAttributes): boolean; var TmpType, TmpStart: Integer; begin @@ -7942,8 +7942,8 @@ begin end; function TCustomSynEdit.GetHighlighterAttriAtRowColEx(XY: TPoint; - var Token: string; var TokenType, Start: Integer; - var Attri: TSynHighlighterAttributes): boolean; + out Token: string; out TokenType, Start: Integer; + out Attri: TSynHighlighterAttributes): boolean; var PosX, PosY: integer; Line: string; @@ -7985,7 +7985,7 @@ begin Result:=(length(c)=1) and (c[1] in IdentChars); end; -procedure TCustomSynEdit.GetWordBoundsAtRowCol(const XY: TPoint; var StartX, +procedure TCustomSynEdit.GetWordBoundsAtRowCol(const XY: TPoint; out StartX, EndX: integer); // all params are logical (byte) positions var Line: string; diff --git a/components/synedit/syneditexport.pas b/components/synedit/syneditexport.pas index 31655da017..39449407f4 100644 --- a/components/synedit/syneditexport.pas +++ b/components/synedit/syneditexport.pas @@ -162,7 +162,7 @@ type {$ENDIF} { Returns a string that has all the invalid chars of the output format replaced with the entries in the replacement array. } - function ReplaceReservedChars(AToken: string; var IsSpace: boolean): string; + function ReplaceReservedChars(AToken: string; out IsSpace: boolean): string; { Sets the token attribute of the next token to determine the changes of colors and font styles so the properties of the next token can be added to the output buffer. } @@ -447,7 +447,7 @@ end; {$ENDIF} function TSynCustomExporter.ReplaceReservedChars(AToken: string; - var IsSpace: boolean): string; + out IsSpace: boolean): string; var I, ISrc, IDest, SrcLen, DestLen: integer; Replace: string; diff --git a/components/synedit/syneditfoldedview.pp b/components/synedit/syneditfoldedview.pp index f2b05689fc..0d7c664b62 100644 --- a/components/synedit/syneditfoldedview.pp +++ b/components/synedit/syneditfoldedview.pp @@ -2885,7 +2885,6 @@ end; function TSynEditFoldProvider.InfoForFoldAtTextIndex(ALine, AFoldIndex: Integer; HideLen: Boolean; NeedLen: Boolean = True): TSynEditFoldProviderNodeInfo; var - c: LongInt; nd: TSynFoldNodeInfo; begin Result.LineCount := 0; @@ -3900,11 +3899,10 @@ var end; var - FldSrcLine, FldSrcIndex, FLdNodeLine, FldLen, FndLen, FldCol: Integer; + FldSrcLine, FldSrcIndex, FLdNodeLine, FldLen, FndLen: Integer; i, j, CurLen: Integer; PrevFldSrcLine: Integer; SubTree: TSynTextFoldAVLTree; - IsHide: Boolean; begin Result := False; FldSrcLine := doStart; diff --git a/components/synedit/syneditlines.pas b/components/synedit/syneditlines.pas index fb1e98bc2a..dc400cf84b 100644 --- a/components/synedit/syneditlines.pas +++ b/components/synedit/syneditlines.pas @@ -54,7 +54,6 @@ type private FFileLineEndType: TSynLinesFileLineEndType; FFileWriteLineEndType: TSynLinesFileLineEndType; - FLineEndType: TSynLinesFileLineEndType; FTextBuffer: TSynEditStringList; FOnSaved: TSavedNotification; function GetTextChangeStamp: int64; diff --git a/components/synedit/syneditpointclasses.pas b/components/synedit/syneditpointclasses.pas index 15f1d12e30..17cc6a4e2c 100644 --- a/components/synedit/syneditpointclasses.pas +++ b/components/synedit/syneditpointclasses.pas @@ -1453,8 +1453,6 @@ procedure TSynEditSelection.SetEndLineBytePos(Value : TPoint); var s: string; {$ENDIF} -var - WasAvail: Boolean; begin if FEnabled then begin Value.y := MinMax(Value.y, 1, fLines.Count); @@ -1477,7 +1475,6 @@ begin {$ENDIF} if (Value.X <> FEndBytePos) or (Value.Y <> FEndLinePos) then begin - WasAvail := SelAvail; if (ActiveSelectionMode = smColumn) and (Value.X <> FEndBytePos) then FInvalidateLinesMethod(Min(FStartLinePos, Min(FEndLinePos, Value.Y)), Max(FStartLinePos, Max(FEndLinePos, Value.Y))) diff --git a/components/synedit/synguttercodefolding.pp b/components/synedit/synguttercodefolding.pp index 1394a479f7..09d37c81e0 100644 --- a/components/synedit/synguttercodefolding.pp +++ b/components/synedit/synguttercodefolding.pp @@ -572,8 +572,6 @@ var rcNode: TRect; ptCenter : TPoint; isPrevLine: Boolean; - i: Integer; - HasExHl: Boolean; DrawOpts: TDrawNodeSymbolOptions; begin isPrevLine := IsFoldHidePreviousLine(iLine); @@ -624,7 +622,6 @@ var then Canvas.Pen.Color := MarkupInfo.FrameColor; - i:= 0; if isPrevLine and (NodeType = cfCollapsedHide) then include(DrawOpts, nsoSubtype); DrawNodeSymbol(Canvas, rcNode, NodeType, DrawOpts); diff --git a/components/synedit/synregexpr.pas b/components/synedit/synregexpr.pas index 8f128232f5..61248c0b65 100644 --- a/components/synedit/synregexpr.pas +++ b/components/synedit/synregexpr.pas @@ -306,7 +306,7 @@ type function GetModifierStr : RegExprString; class function ParseModifiersStr (const AModifiers : RegExprString; - var AModifiersInt : integer) : boolean; //###0.941 class function now + out AModifiersInt : integer) : boolean; //###0.941 class function now // Parse AModifiers string and return true and set AModifiersInt // if it's in format 'ismxrg-ismxrg'. procedure SetModifierStr (const AModifiers : RegExprString); @@ -340,7 +340,7 @@ type // insert an operator in front of already-emitted operand // Means relocating the operand. - function ParseReg (paren : integer; var flagp : integer) : PRegExprChar; + function ParseReg (paren : integer; out flagp : integer) : PRegExprChar; // regular expression, i.e. main body or parenthesized thing function ParseBranch (var flagp : integer) : PRegExprChar; @@ -1328,7 +1328,7 @@ function TRegExpr.GetModifierStr : RegExprString; --------------------------------------------------------------} class function TRegExpr.ParseModifiersStr (const AModifiers : RegExprString; -var AModifiersInt : integer) : boolean; +out AModifiersInt : integer) : boolean; // !!! Be carefull - this is class function and must not use object instance fields var i : integer; @@ -1746,7 +1746,7 @@ function TRegExpr.CompileRegExpr (exp : PRegExprChar) : boolean; end; { of function TRegExpr.CompileRegExpr --------------------------------------------------------------} -function TRegExpr.ParseReg (paren : integer; var flagp : integer) : PRegExprChar; +function TRegExpr.ParseReg (paren : integer; out flagp : integer) : PRegExprChar; // regular expression, i.e. main body or parenthesized thing // Caller must absorb opening parenthesis. // Combining parenthesis handling with the base level of regular expression