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

Use std::vector for colwidths #717

Merged
merged 1 commit into from
Sep 14, 2024
Merged

Conversation

tobiolo
Copy link
Collaborator

@tobiolo tobiolo commented Sep 14, 2024

Use std::vector as columns are modified (inserted/removed) dynamically.

@tobiolo
Copy link
Collaborator Author

tobiolo commented Sep 14, 2024

This aims to make use of conveniences provided by the STL and to increase maintainability of the code

Use std::vector as columns are modified (inserted/removed) dynamically.
@tobiolo tobiolo merged commit 4408bd1 into aardappel:master Sep 14, 2024
4 checks passed
@tobiolo tobiolo deleted the colwidths-vector branch September 14, 2024 19:43
@@ -5,7 +5,7 @@ struct Grid {
// subcells
Cell **cells;
// widths for each column
int *colwidths {nullptr};
std::vector<int> colwidths {};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{} not needed here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks, pushed a commit for this.

Copy link
Owner

@aardappel aardappel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice simplification :)

@tobiolo
Copy link
Collaborator Author

tobiolo commented Sep 16, 2024

You are welcome 👍

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