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

Refactor sequence_parser.cpp #55

Open
KOLANICH opened this issue Jan 23, 2019 · 2 comments
Open

Refactor sequence_parser.cpp #55

KOLANICH opened this issue Jan 23, 2019 · 2 comments

Comments

@KOLANICH
Copy link

KOLANICH commented Jan 23, 2019

  1. switch is abused. It may make sense to populate a data structure, select from it and hope that the compiler would optimize it away.
  2. it is too coupled with drawing to screen. It may make sense to emit a sequence of structures describing chunks of text and their styles. And maybe create a separate lib, useful for other software.
@M-griffin M-griffin self-assigned this Jan 25, 2019
@M-griffin
Copy link
Owner

M-griffin commented Jan 25, 2019

Thanks for the feedback, I have been thinking of different ways to rewrite this. Trying to picture a good way of parsing the sequences into structures before hand so each election can do an action. Maybe a nice Key/value hashmap build up on the control sequences instead of case statements would work better.

@M-griffin
Copy link
Owner

Have some ideas on this. Once i get some of the menu system rewrite finished for the dialing directory i'll take a look at reworking this.

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

No branches or pull requests

2 participants