From 5a44fd12ffa50c3df671d2f9fe4a34a76b2a8cd3 Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Fri, 29 Mar 2024 15:32:18 +0100 Subject: [PATCH] cleanup TODO's --- DataScraping/XML/NamedItems.pas | 13 +++++-------- Packing/Template/LowLvl/BinUtils.pas | 2 -- Utils/Fixers.pas | 2 +- Utils/Patterns.pas | 3 --- Utils/Patterns/test.pas | 4 ++-- Utils/SubExecuters.pas | 2 -- 6 files changed, 8 insertions(+), 18 deletions(-) diff --git a/DataScraping/XML/NamedItems.pas b/DataScraping/XML/NamedItems.pas index b60891fd..6336688a 100644 --- a/DataScraping/XML/NamedItems.pas +++ b/DataScraping/XML/NamedItems.pas @@ -289,10 +289,9 @@ {$region Pre-saving} - //TODO #3059: as, use operator explicit - protected function NameApi: string; virtual := (self.Name as IComplexName).ApiName; - protected function NameSuffix: string; virtual := (self.Name as IComplexName).VendorSuffix; - protected function NameLocal: string; virtual := (self.Name as IComplexName).LocalName; + protected function NameApi: string; virtual := IComplexName(self.Name).ApiName; + protected function NameSuffix: string; virtual := IComplexName(self.Name).VendorSuffix; + protected function NameLocal: string; virtual := IComplexName(self.Name).LocalName; protected function NameWithoutSuffix: TName; virtual; begin @@ -362,8 +361,7 @@ Sort(save_ready, item->item.Name); for var i := 0 to save_ready.Length-1 do - //TODO #3060: as - (save_ready[i] as NamedItem).bin_index := i; + save_ready[i].bin_index := i; end; @@ -417,8 +415,7 @@ end; public static function DistillAllUnique(inp: sequence of TSelf) := DistillAllUnique(inp, o->o, nil).ConvertAll(o->o.AfterMerges); - //TODO #3059: as, use operator explicit - protected procedure SaveName(bw: BinWriter); virtual := (Name as IBinSavable).Save(bw); + protected procedure SaveName(bw: BinWriter); virtual := IBinSavable(Name).Save(bw); protected procedure SaveBody(bw: BinWriter); abstract; private saved := false; public procedure Save(bw: BinWriter); diff --git a/Packing/Template/LowLvl/BinUtils.pas b/Packing/Template/LowLvl/BinUtils.pas index 28fe835a..85c83aea 100644 --- a/Packing/Template/LowLvl/BinUtils.pas +++ b/Packing/Template/LowLvl/BinUtils.pas @@ -1,7 +1,5 @@ unit BinUtils; -{$savepcu false} //TODO #3057 - uses System; uses '..\..\..\Utils\TypeMagic'; diff --git a/Utils/Fixers.pas b/Utils/Fixers.pas index b96fae5d..4dfc97ea 100644 --- a/Utils/Fixers.pas +++ b/Utils/Fixers.pas @@ -53,7 +53,7 @@ interface var start := true; var bl_start := true; - //TODO #2683 + //TODO #2715 var make_res: function: (array of string,array of string) := ()-> begin var lc := res.Count; diff --git a/Utils/Patterns.pas b/Utils/Patterns.pas index f884fee3..7c9ce696 100644 --- a/Utils/Patterns.pas +++ b/Utils/Patterns.pas @@ -1,9 +1,6 @@ unit Patterns; {$zerobasedstrings} -//TODO #2739 -{$savepcu false} - interface uses System; diff --git a/Utils/Patterns/test.pas b/Utils/Patterns/test.pas index 104e569a..a0aca4c9 100644 --- a/Utils/Patterns/test.pas +++ b/Utils/Patterns/test.pas @@ -37,9 +37,9 @@ var p: MergedString; begin - var ps := EnumerateFiles('G:/0Prog/AutoMaximize/Classes/1 What') + var ps := EnumerateFiles('G:\0Prog\AutoMaximize\Classes\1 What') .Select(System.IO.Path.GetFileName) - .Where(fname->fname.StartsWith('HwndWrapper')) +// .Where(fname->fname.StartsWith('HwndWrapper')) .Select(MergedString.Literal) .ToHashSet; while ps.Count.Println>1 do diff --git a/Utils/SubExecuters.pas b/Utils/SubExecuters.pas index 6dc573cf..4bb92537 100644 --- a/Utils/SubExecuters.pas +++ b/Utils/SubExecuters.pas @@ -7,8 +7,6 @@ uses PathUtils; uses Timers; -uses AQueue; //TODO #2543 - {$region Helpers} type