Skip to content

Commit 393b456

Browse files
refactor: turned off UseLocale in TStringList (learned from bfire)
1 parent 759aaf5 commit 393b456

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

entries/dcornelius/src/uChallengeWithStringList.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ procedure ChallengeWithStringList;
5858
StopWatch.ElapsedMilliseconds]));
5959
{$ENDIF}
6060

61-
SortedList := TStringList.Create(TDuplicates.dupAccept, False, True);
61+
SortedList := TStringList.Create(TDuplicates.dupIgnore, False, True);
6262
try
6363
// process all rows
6464
for CurrLine := 0 to WeatherLines.Count - 1 do begin
@@ -71,6 +71,7 @@ procedure ChallengeWithStringList;
7171
TWeatherCity(SortedList.Objects[ListCity]).AddNewTemp(CityTemp);
7272
end;
7373
end;
74+
SortedList.UseLocale := False;
7475
SortedList.Sort;
7576

7677
Write('{');

0 commit comments

Comments
 (0)