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

Deduplicate code for drawing labeled bars of chars #64367

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

sparr
Copy link
Member

@sparr sparr commented Mar 18, 2023

Summary

None

Purpose of change

Existing code for drawing bars like Foo: [***--. ], with or without color, is repetitive

Describe the solution

Move repetitive code out to helper functions

Describe alternatives you've considered

I started with less templating but didn't like the results. I did consider defining the printer functions rather than using lambdas and could do that instead if requested.

Testing

Played around with ranged fire interface in different situations

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Mar 18, 2023
@sparr sparr force-pushed the dedupe_get_colored_bar branch from 3d40456 to 73e5e68 Compare March 19, 2023 08:40
@kevingranade
Copy link
Member

This has several clang tidy warnings.

@sparr sparr force-pushed the dedupe_get_colored_bar branch from 73e5e68 to 3530a1f Compare March 28, 2023 05:46
@Fris0uman Fris0uman merged commit 5c077fa into CleverRaven:master Mar 29, 2023
@sparr sparr deleted the dedupe_get_colored_bar branch March 29, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants