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 warning system to reduce number of custom methods #50

Open
grunt-lucas opened this issue Jul 13, 2024 · 0 comments
Open

Refactor warning system to reduce number of custom methods #50

grunt-lucas opened this issue Jul 13, 2024 · 0 comments
Assignees
Labels
refactoring Code cleanup that doesn't significantly alter functionality
Milestone

Comments

@grunt-lucas
Copy link
Owner

We could have something like the following:

void issueWarning(Warning warning, std::string message) {
    // use Warning enum to increment a counter in a std::map
    // print the message
}

std::string formatTileMessage(int a, int b) {
    // complex message formatting is handled by helper methods
}

// the calling code would do the following:
issueWarning(Warning::BAD_TILE, formatTileMessage(foo, 10));
@grunt-lucas grunt-lucas added the enhancement New feature or request label Jul 13, 2024
@grunt-lucas grunt-lucas self-assigned this Jul 13, 2024
@grunt-lucas grunt-lucas added this to the 2.0 Refactor Effort milestone Sep 14, 2024
@grunt-lucas grunt-lucas added refactoring Code cleanup that doesn't significantly alter functionality and removed enhancement New feature or request labels Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code cleanup that doesn't significantly alter functionality
Projects
None yet
Development

No branches or pull requests

1 participant