Amjad50 / plastic

NES emulator in rust with egui and TUI
MIT License
299 stars 12 forks source link

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

Closed silverhadch closed 15 hours ago

silverhadch commented 1 day ago

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 commented 15 hours ago

Closed by #13