From 32058c1f1cda7eb0fc03f93c443a3c97af9c9698 Mon Sep 17 00:00:00 2001 From: Jacek Pazera Date: Thu, 16 Jun 2022 19:58:38 +0200 Subject: [PATCH] Cosmetics (not important) --- Base/JPL.Files.pas | 7 ++++--- Base/JPL.JsonHelpers.pas | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Base/JPL.Files.pas b/Base/JPL.Files.pas index fd9d7d4..acfd55c 100644 --- a/Base/JPL.Files.pas +++ b/Base/JPL.Files.pas @@ -166,12 +166,13 @@ function AddUncPrefix(const FileOrDirectoryName: string): string; function DirectoryExistsEx(const Dir: string; AcceptSymLinks: Boolean = True): Boolean; var SR: SysUtils.TSearchRec; - + {$WARN SYMBOL_PLATFORM OFF} function IsDirectory: Boolean; begin Result := ( (SR.Attr and faDirectory) <> 0 ) and (SR.Name <> '.') and (SR.Name <> '..'); if Result and (not AcceptSymLinks) then Result := ( Result and ( (SR.Attr and faSymLink) = 0) ); end; + {$WARN SYMBOL_PLATFORM ON} begin Result := False; @@ -192,7 +193,7 @@ function GetFiles(const Directory: string; SearchPattern: string = '*'; RecurseD sl: TStringList; i: integer; begin - SetLength(Result, 0); + SetLength(Result{%H-}, 0); sl := TStringList.Create; try JPGetFileList(SearchPattern, Directory, sl, RecurseDepth, AcceptSymLinks, AcceptSymLinks, nil, nil, nil); @@ -212,7 +213,7 @@ function GetDirectories(const StartDir: string; RecurseDepth: Word = 0; AcceptSy sl: TStringList; i: integer; begin - SetLength(Result, 0); + SetLength(Result{%H-}, 0); sl := TStringList.Create; try JPGetDirectoryList(StartDir, sl, AcceptSymLinks, RecurseDepth, nil); diff --git a/Base/JPL.JsonHelpers.pas b/Base/JPL.JsonHelpers.pas index dfa9b65..5e0987a 100644 --- a/Base/JPL.JsonHelpers.pas +++ b/Base/JPL.JsonHelpers.pas @@ -10,12 +10,12 @@ Last mod: 2022.05 } +{$I .\..\jp.inc} + {$IFNDEF FPC} This unit is for FPC only! {$ENDIF} -{$I .\..\jp.inc} - {$mode objfpc}{$H+} interface