region management / remove redundant computation #524
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes yakra#220. Removes an unused vestigial variable.
Closes #523.
Closes #522.
C++ Region management:
newRegion objects on the heap and store pointers in avector, Regions are emplaced in alist. (I'd prefer avector, but can't becauseRegioncontains astd::mutex, which is immovable, makingRegions immovable too. Went with this instead.)I don't have to manually delete anything, as the list destructor cleans the objects up at the end of the program when the list goes out of scope.
Next up: TravelerLists.
Regionctor to throw if the regions.csv line has the wrong # of fields. AIUI that's considered better practice than setting & checking avalidbit and deleting a fully constructed object, popping it from a container, etc. Cleaner code either way, and a tad less RAM.