Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add helper method IsIndexValid #5

Open
Alexey-T opened this issue Nov 26, 2022 · 2 comments
Open

add helper method IsIndexValid #5

Alexey-T opened this issue Nov 26, 2022 · 2 comments

Comments

@Alexey-T
Copy link

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 Alexey-T changed the title add IsIndexValid add helper method IsIndexValid Nov 26, 2022
@PascalVault
Copy link
Owner

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

@Alexey-T
Copy link
Author

then add inline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants