LazUtils: Remove WriteLn() from TStringListUTF8Fast.InsertItem. Causes trouble on Windows.

(cherry picked from commit 2c81dff5d9)
This commit is contained in:
Juha 2024-02-09 10:32:41 +02:00 committed by Maxim Ganetsky
parent 9876cb96f9
commit f9216f15d2

View File

@ -4015,15 +4015,15 @@ end;
constructor TStringListUTF8Fast.Create; constructor TStringListUTF8Fast.Create;
begin begin
inherited Create; inherited Create;
UseLocale := False; // Assume pure ASCII string. Comparison will be fast. UseLocale := False; // Assume pure ASCII. Comparison will be fast.
end; end;
procedure TStringListUTF8Fast.InsertItem(Index: Integer; const S: string; O: TObject); procedure TStringListUTF8Fast.InsertItem(Index: Integer; const S: string; O: TObject);
begin begin
if not IsPureAscii(S) then if not IsPureAscii(S) then
begin begin
// Unicode string found, switch to Unicode mode. // Non-ASCII string found, switch to Unicode mode.
WriteLn('TStringListUTF8Fast.InsertItem: Found non-ASCII string "'+S+'"'); //WriteLn('TStringListUTF8Fast.InsertItem: Found non-ASCII string "'+S+'"');
UseLocale := True; UseLocale := True;
if Sorted then if Sorted then
Sort; // Sort a sorted list again with AnsiCompare.. functions. Sort; // Sort a sorted list again with AnsiCompare.. functions.