Lazarus_Hashing icon indicating copy to clipboard operation
Lazarus_Hashing copied to clipboard

add helper method IsIndexValid

Open Alexey-T opened this issue 2 years ago • 2 comments

adding helper func will help in places like this:

function THasherList.GetName(Index: Integer): String;
begin
  if (Index > FList.Count-1) or (Index < 0) then Result := ''

Alexey-T avatar Nov 26 '22 14:11 Alexey-T

This is a very simple IF. Replacing it with a method will make the slower.

PascalVault avatar Nov 26 '22 16:11 PascalVault

then add inline.

Alexey-T avatar Nov 26 '22 16:11 Alexey-T