From 6e19a724ea7e19a156260dd6139d396b6faa420d Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 19 Sep 2021 14:14:01 +0200 Subject: [PATCH] cleanup and address a few warnings --- src/u_ceproject.pas | 7 +------ src/u_projinspect.pas | 4 ---- src/u_synmemo.pas | 3 +-- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/u_ceproject.pas b/src/u_ceproject.pas index 0fc3e5ed..9c430fbd 100644 --- a/src/u_ceproject.pas +++ b/src/u_ceproject.pas @@ -597,7 +597,7 @@ var exit; // TODO-cimprovement: use commonFolder() when it'll be compat. with the rel. paths. // hint for the common dir - dirHint := fSrcs[i]; + dirHint := fSrcs[fSrcs.Count-1]; while (dirHint[1] = '.') or (dirHint[1] = DirectorySeparator) do dirHint := dirHint[2..dirHint.length]; ini := fFilename.extractFilePath; @@ -1174,17 +1174,12 @@ begin end; procedure setCEProjectCompiler(value: DCompiler); -var - sel: ICompilerSelector; begin - sel := getCompilerSelector; if value = gdc then value := gdmd else if value = ldc then value := ldmd; CEProjectCompiler := value; - //if not sel.isCompilerValid(CEProjectCompiler) then - // CEProjectCompiler := dmd; end; initialization diff --git a/src/u_projinspect.pas b/src/u_projinspect.pas index fe2be60e..8667c9b7 100644 --- a/src/u_projinspect.pas +++ b/src/u_projinspect.pas @@ -639,16 +639,12 @@ end; procedure TProjectInspectWidget.updateImperative; var - conf: string; itm: TTreeNode; chd: TTreeNode; i,j: integer; - sel: string = ''; fld: string; rng: TStringRange = (ptr:nil; pos:0; len:0); begin - if Tree.Selected.isAssigned then - sel := Tree.Selected.GetTextPath; fFileNode.DeleteChildren; if fProj.isNotAssigned then diff --git a/src/u_synmemo.pas b/src/u_synmemo.pas index 801c03f6..59b2531c 100644 --- a/src/u_synmemo.pas +++ b/src/u_synmemo.pas @@ -10,7 +10,7 @@ uses SynHighlighterLFM, SynEditHighlighter, SynEditMouseCmds, SynEditFoldedView, SynEditMarks, SynEditTypes, SynHighlighterJScript, SynBeautifier, dialogs, md5, Spin, LCLIntf, LazFileUtils, LMessages, SynHighlighterCpp, math, - SynGutterMarks, SynGutterBase, LCLVersion, + SynGutterBase, LCLVersion, //SynEditMarkupFoldColoring, Clipbrd, fpjson, jsonparser, LazUTF8, LazUTF8Classes, Buttons, StdCtrls, u_common, u_writableComponent, u_d2syn, u_txtsyn, u_dialogs, @@ -2882,7 +2882,6 @@ procedure TDexedMemo.getCompletionList; var i: integer; o: TObject; - s: string; w: string; r: TStringRange = (ptr:nil; pos:0; len: 0); h: TStringHashSet;