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 robot id string serialization #1007

Merged
merged 6 commits into from
Jun 26, 2021
Merged

Conversation

DanRStevens
Copy link
Member

Reference: #830

Refactor robot id list processing for RobotCommand structures. Lift XML related code out of lower level functions. Use a more functional programming style for array transformations.

If the function is only meant to work on RobotCommand structures, then
that's what it should accept. It would be unsafe to call it with any
other type of Structure.
The nullptr check fits more logically with the other similar check
outside of `readRccRobots`. Besides, this method doesn't even really
need to know about XmlAttributes.
When reading a specific attribute and getting back a string, a default
value of "" is used if the attribute isn't found. That is a safe value
that effectively does nothing in `readRccRobots`.
@DanRStevens DanRStevens merged commit 8195a6f into master Jun 26, 2021
@DanRStevens DanRStevens deleted the refactorRobotIdString branch June 26, 2021 17:11
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.

1 participant