From 7baf255fdad41f477e11ffbf37f15b32920a198d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Sat, 9 Dec 2023 14:44:47 +0100 Subject: [PATCH] Changed result type in ISolver from Cardinal to Int64 for Day 8, part 2 --- USolver.pas | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/USolver.pas b/USolver.pas index 47a8f64..9d0df05 100644 --- a/USolver.pas +++ b/USolver.pas @@ -36,27 +36,27 @@ type procedure Free; function GetDataFileName: string; function GetPuzzleName: string; - function GetResultPart1: Cardinal; - function GetResultPart2: Cardinal; + function GetResultPart1: Int64; + function GetResultPart2: Int64; property DataFileName: string read GetDataFileName; property PuzzleName: string read GetPuzzleName; - property ResultPart1: Cardinal read GetResultPart1; - property ResultPart2: Cardinal read GetResultPart2; + property ResultPart1: Int64 read GetResultPart1; + property ResultPart2: Int64 read GetResultPart2; end; { TSolver } TSolver = class abstract(ISolver) protected - FPart1, FPart2: Cardinal; + FPart1, FPart2: Int64; public procedure Init; virtual; procedure ProcessDataLine(const ALine: string); virtual; abstract; procedure Finish; virtual; abstract; function GetDataFileName: string; virtual; abstract; function GetPuzzleName: string; virtual; abstract; - function GetResultPart1: Cardinal; virtual; - function GetResultPart2: Cardinal; virtual; + function GetResultPart1: Int64; virtual; + function GetResultPart2: Int64; virtual; end; { TSolverEngine } @@ -81,12 +81,12 @@ begin FPart2 := 0; end; -function TSolver.GetResultPart1: Cardinal; +function TSolver.GetResultPart1: Int64; begin Result := FPart1; end; -function TSolver.GetResultPart2: Cardinal; +function TSolver.GetResultPart2: Int64; begin Result := FPart2; end;