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

Unnecessary Repeated Calls to self.nes.is_empty() #21

Closed
silverhadch opened this issue Oct 22, 2024 · 1 comment
Closed

Unnecessary Repeated Calls to self.nes.is_empty() #21

silverhadch opened this issue Oct 22, 2024 · 1 comment

Comments

@silverhadch
Copy link
Contributor

The self.nes.is_empty() check is called multiple times in different methods (e.g., get_save_state_path, get_present_save_states). This could lead to redundant checks.

Cache the result of self.nes.is_empty() in a local variable or within the struct to avoid unnecessary repeated calls.

@Amjad50
Copy link
Owner

Amjad50 commented Oct 23, 2024

Closed by #13

@Amjad50 Amjad50 closed this as completed Oct 23, 2024
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