-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Task mpl 2 #819
Task mpl 2 #819
Conversation
closes vegastrike#751 Also add tests and a few additional methods to store.
Decouple it from rest of code and make it and cargo part of resource lib.
Summarizing discussions from #816: Probably not an issue for WC but I will set aside time after lib component to stabilize WC and test it. We don't. |
I have no idea why this is failing. /usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits::rebind_alloc<A::value_type> must be A |
Decouple it from rest of code and make it and cargo part of resource lib.
Are you sure that generating random cargo with the mission in the name is just the fallback? Rather than one of the primary purposes of this code? If you're running a cargo mission, you need cargo to deliver, right? 🙂 Even if it is just a fallback, that would mean that we're changing code behavior with respect to an edge case. As a general rule, I think we're better off not changing effective code behavior during a refactor. Even in relatively minor ways. Separating out behavior changes from refactors can make things significantly easier to sort out later, it seems to me. Of course, it's possible to be too pedantic about this. But what are your thoughts on the above? |
You are quite correct about that memory leak being there in the old code, comment notwithstanding. We should definitely avoid that. Perhaps log a fatal error and exit, if that code block ever gets hit? |
Reintroduce mission based random cargo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
I especially like how you used the inline lambda function there. That adds a nice touch |
This is a reopening of #816.
This code decouple the MPL from rest of main body of code and make it and cargo part of resource lib. It makes it easier to test (some basic tests included) and also removes dependencies on the gfx folder among others.
This PR is part of a list of small PRs intended to come before #810. They are intended to clear the way for it and reduce the actual code in it to a manageable level. Note that #810 is a draft PR for review. Once these PR's are merged, I may break it up into smaller chunks for better processing.
Code Changes:
[x] Have the PR Validation Tests been run? See https://github.com/vegastrike/Vega-Strike-Engine-Source/wiki/Pull-Request-Validation
Issues: