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

Some cleanup of vehicle code #76052

Merged
merged 2 commits into from
Sep 17, 2024
Merged

Conversation

SurFlurer
Copy link
Contributor

@SurFlurer SurFlurer commented Aug 30, 2024

Summary

none

Purpose of change

  1. There's one unnecessary copy of vehicle parts.
  2. When I wrote vehicle prototype exporting feature, I added some redundant validation code that can be safely removed. The vpart_reference iterator already iterates through all parts in an order that they can be installed, so there's no need to rearrange vehicle parts at a certain mount point.

Describe the solution

  1. Remove the unnecessary copy.
  2. Remove the redundant code.

Describe alternatives you've considered

Testing

Tests passed.
Exporting vehicle prototypes still works as expected.

Additional context

@github-actions github-actions bot added Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Aug 30, 2024
@SurFlurer SurFlurer closed this Sep 10, 2024
@SurFlurer SurFlurer reopened this Sep 10, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Sep 10, 2024
@Maleclypse Maleclypse merged commit 6ded987 into CleverRaven:master Sep 17, 2024
44 of 51 checks passed
@SurFlurer SurFlurer deleted the no_copy_vp branch September 17, 2024 14:56
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 Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants