mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:48:03 +02:00
SynEdit, FpDebug, LazUtils, IdeIntf: Remove UTF8CompareLatinTextFast calls.
This commit is contained in:
parent
bc201de1ed
commit
08c0f4865d
@ -43,8 +43,10 @@ unit FpDbgDwarfDataClasses;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Types, SysUtils, contnrs, Math, Maps, LazClasses, LazFileUtils,
|
Classes, Types, SysUtils, Contnrs, Math,
|
||||||
{$ifdef FORCE_LAZLOGGER_DUMMY} LazLoggerDummy {$else} LazLoggerBase {$endif}, LazUTF8, lazCollections,
|
// LazUtils
|
||||||
|
Maps, LazClasses, LazFileUtils, LazUTF8, LazCollections,
|
||||||
|
{$ifdef FORCE_LAZLOGGER_DUMMY} LazLoggerDummy {$else} LazLoggerBase {$endif},
|
||||||
// FpDebug
|
// FpDebug
|
||||||
FpDbgUtil, FpDbgInfo, FpDbgDwarfConst, FpDbgCommon, FpDbgDwarfCFI,
|
FpDbgUtil, FpDbgInfo, FpDbgDwarfConst, FpDbgCommon, FpDbgDwarfCFI,
|
||||||
FpDbgLoader, FpImgReaderBase, FpdMemoryTools, FpErrorMessages, DbgIntfBaseTypes;
|
FpDbgLoader, FpImgReaderBase, FpdMemoryTools, FpErrorMessages, DbgIntfBaseTypes;
|
||||||
@ -5194,7 +5196,7 @@ function TDwarfCompilationUnit.GetLineAddressMap(const AFileName: String): PDWar
|
|||||||
if Result <> -1 then Exit;
|
if Result <> -1 then Exit;
|
||||||
|
|
||||||
for Result := 0 to FLineNumberMap.Count - 1 do
|
for Result := 0 to FLineNumberMap.Count - 1 do
|
||||||
if UTF8CompareLatinTextFast(Name, ExtractFileName(FLineNumberMap[Result])) = 0 then
|
if AnsiCompareText(Name, ExtractFileName(FLineNumberMap[Result])) = 0 then
|
||||||
Exit;
|
Exit;
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
|
@ -18,7 +18,7 @@ uses
|
|||||||
// LCL
|
// LCL
|
||||||
StdCtrls, ImgList, Graphics,
|
StdCtrls, ImgList, Graphics,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazUTF8, LazFileUtils;
|
LazFileUtils;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCmpStrType = (
|
TCmpStrType = (
|
||||||
@ -54,7 +54,7 @@ begin
|
|||||||
for i:=0 to List.Count-1 do begin
|
for i:=0 to List.Count-1 do begin
|
||||||
case Cmp of
|
case Cmp of
|
||||||
cstCaseSensitive: if List[i]=s then exit(i);
|
cstCaseSensitive: if List[i]=s then exit(i);
|
||||||
cstCaseInsensitive: if UTF8CompareLatinTextFast(List[i],s)=0 then exit(i);
|
cstCaseInsensitive: if AnsiCompareText(List[i],s)=0 then exit(i);
|
||||||
cstFilename: if CompareFilenames(List[i],s)=0 then exit(i);
|
cstFilename: if CompareFilenames(List[i],s)=0 then exit(i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
for details about the license.
|
for details about the license.
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
}
|
}
|
||||||
unit lazCollections;
|
unit LazCollections;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
{$ModeSwitch advancedrecords}
|
{$ModeSwitch advancedrecords}
|
||||||
|
@ -384,7 +384,7 @@ begin
|
|||||||
if CaseSensitive then
|
if CaseSensitive then
|
||||||
Result := CompareStr(FnExt, Ext)
|
Result := CompareStr(FnExt, Ext)
|
||||||
else
|
else
|
||||||
Result := UTF8CompareLatinTextFast(FnExt, Ext);
|
Result := CompareText(FnExt, Ext);
|
||||||
if Result < 0 then
|
if Result < 0 then
|
||||||
Result := -1
|
Result := -1
|
||||||
else if Result > 0 then
|
else if Result > 0 then
|
||||||
|
@ -24,9 +24,9 @@ unit pocheckermain;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, LazFileUtils, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, Types,
|
||||||
StdCtrls, CheckLst, Buttons, ExtCtrls, ComCtrls, Types,
|
FileUtil, LazFileUtils,
|
||||||
LCLType, LazUTF8,
|
Forms, Controls, Graphics, Dialogs, StdCtrls, CheckLst, Buttons, ExtCtrls, ComCtrls, LCLType,
|
||||||
{$IFDEF POCHECKERSTANDALONE}
|
{$IFDEF POCHECKERSTANDALONE}
|
||||||
LCLTranslator,
|
LCLTranslator,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -566,7 +566,7 @@ end;
|
|||||||
|
|
||||||
function ListSortFunc(List: TStringList; Index1, Index2: Integer): Integer;
|
function ListSortFunc(List: TStringList; Index1, Index2: Integer): Integer;
|
||||||
begin
|
begin
|
||||||
Result := UTF8CompareLatinTextFast(List.Strings[Index1], List.Strings[Index2]);
|
Result := CompareText(List.Strings[Index1], List.Strings[Index2]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPoCheckerForm.LangFilterIndexToLangID(Index: Integer): TLangID;
|
function TPoCheckerForm.LangFilterIndexToLangID(Index: Integer): TLangID;
|
||||||
|
@ -1158,16 +1158,15 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
if FCaseSensitive then begin
|
if FCaseSensitive then begin
|
||||||
for i := 0 to Pred(ItemList.Count) do
|
for i := 0 to Pred(ItemList.Count) do
|
||||||
if 0 = CompareStr(fCurrentString,
|
if 0 = CompareStr(fCurrentString, Copy(ItemList[i], 1, Length(fCurrentString)))
|
||||||
Copy(ItemList[i], 1, Length(fCurrentString)))
|
|
||||||
then begin
|
then begin
|
||||||
Position := i;
|
Position := i;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
for i := 0 to Pred(ItemList.Count) do
|
for i := 0 to Pred(ItemList.Count) do
|
||||||
if 0 = UTF8CompareLatinTextFast(fCurrentString,
|
if 0 = AnsiCompareText(fCurrentString,
|
||||||
Copy(ItemList[i], 1, Length(fCurrentString)))
|
Copy(ItemList[i], 1, Length(fCurrentString)))
|
||||||
then begin
|
then begin
|
||||||
Position := i;
|
Position := i;
|
||||||
break;
|
break;
|
||||||
|
@ -275,9 +275,9 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
while i > -1 do begin
|
while i > -1 do begin
|
||||||
s := fCompletions[i];
|
s := fCompletions[i];
|
||||||
if UTF8CompareLatinTextFast(s, AToken) = 0 then
|
if AnsiCompareText(s, AToken) = 0 then
|
||||||
break
|
break
|
||||||
else if UTF8CompareLatinTextFast(Copy(s, 1, Len), AToken) = 0 then begin
|
else if AnsiCompareText(Copy(s, 1, Len), AToken) = 0 then begin
|
||||||
Inc(NumMaybe);
|
Inc(NumMaybe);
|
||||||
IdxMaybe := i;
|
IdxMaybe := i;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user