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

chore(views): Reimplement views using slices #330

Merged
merged 1 commit into from
Jun 16, 2022
Merged

Conversation

AXDOOMER
Copy link
Collaborator

I've reimplemented views using a slice because I though the current implementation using an array of an arbitrary size could be better, especially because it was wasting space as a means to avoid a buffer overflow. I've also removed mutexes because this code is never called in a concurrent way and I don't see any reasons why it would be in the future.

Errors are now managed using log.Fatal which I dislike because the program may exit without the error message being printed to the console, but it's used all over the place in NoiseTorch's source code. In the case of views, these errors should never happen, unless a programmer did something wrong in the UI code like mistakenly closing two views when there was only one existing.

Again, any feedback welcome, even if nit-picky.

@AXDOOMER AXDOOMER merged commit 4ac6780 into master Jun 16, 2022
@AXDOOMER AXDOOMER deleted the chore/views branch June 16, 2022 19:26
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

Successfully merging this pull request may close these issues.

2 participants