Changed result fields to be Cardinal instead of Integer

This commit is contained in:
Stefan Müller 2023-12-05 14:41:14 +01:00 committed by Stefan Müller
parent e04577725b
commit 931b4b60f9
1 changed files with 9 additions and 9 deletions

View File

@ -36,27 +36,27 @@ type
procedure Free; procedure Free;
function GetDataFileName: string; function GetDataFileName: string;
function GetPuzzleName: string; function GetPuzzleName: string;
function GetResultPart1: Integer; function GetResultPart1: Cardinal;
function GetResultPart2: Integer; function GetResultPart2: Cardinal;
property DataFileName: string read GetDataFileName; property DataFileName: string read GetDataFileName;
property PuzzleName: string read GetPuzzleName; property PuzzleName: string read GetPuzzleName;
property ResultPart1: Integer read GetResultPart1; property ResultPart1: Cardinal read GetResultPart1;
property ResultPart2: Integer read GetResultPart2; property ResultPart2: Cardinal read GetResultPart2;
end; end;
{ TSolver } { TSolver }
TSolver = class abstract(ISolver) TSolver = class abstract(ISolver)
protected protected
FPart1, FPart2: Integer; FPart1, FPart2: Cardinal;
public public
procedure Init; virtual; procedure Init; virtual;
procedure ProcessDataLine(const ALine: string); virtual; abstract; procedure ProcessDataLine(const ALine: string); virtual; abstract;
procedure Finish; virtual; abstract; procedure Finish; virtual; abstract;
function GetDataFileName: string; virtual; abstract; function GetDataFileName: string; virtual; abstract;
function GetPuzzleName: string; virtual; abstract; function GetPuzzleName: string; virtual; abstract;
function GetResultPart1: Integer; virtual; function GetResultPart1: Cardinal; virtual;
function GetResultPart2: Integer; virtual; function GetResultPart2: Cardinal; virtual;
end; end;
{ TSolverEngine } { TSolverEngine }
@ -81,12 +81,12 @@ begin
FPart2 := 0; FPart2 := 0;
end; end;
function TSolver.GetResultPart1: Integer; function TSolver.GetResultPart1: Cardinal;
begin begin
Result := FPart1; Result := FPart1;
end; end;
function TSolver.GetResultPart2: Integer; function TSolver.GetResultPart2: Cardinal;
begin begin
Result := FPart2; Result := FPart2;
end; end;