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

Adds a comma inbetween the flags when writing to xml #191

Merged
merged 8 commits into from
Oct 31, 2023

Conversation

klingbolt
Copy link
Contributor

@klingbolt klingbolt commented Oct 31, 2023

Address issue #190

The filter classes are currently outputting incorrect information. The filters should have an output with a comma between.

e.g. Mount="raptor,springer,beetle" but we are currently outputting Mount="raptorspringerbeetle"

Comment on lines 85 to 89
for (size_t i = 0; i < flag_values.size(); ++i) {
output += flag_values[i];
if (i < flag_values.size() - 1) {
output += ",";
}
Copy link
Owner

Choose a reason for hiding this comment

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

use the stringhelper join function instead here. It does exactly what you want and (will soon have) an optimization to preallocate the full size of the output string instead of reallocating each iteration of the loop.

@AsherGlick
Copy link
Owner

Also add a new testcase for this change to prove the code is doing what you expect.

@AsherGlick AsherGlick merged commit f38417d into AsherGlick:xml_converter Oct 31, 2023
6 checks passed
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