Uh oh!
There was an error while loading. Please reload this page.
various minor improvements, take 2 - #507
Merged
Merged
Conversation
interactive rebase b54179c4e74277197b9d4efbcd47a01094f39179
This was introduced after the switch to clang, but only g++ reports it.
Doesn't need to be permanent.
interactive rebase d56e5a6
same as d2cdcaa but without the changes to HighwaySystem.cpp Route.cpp sql_file.cpp
...OR use unordered_map::count, only to search again Also nix an unnecessary conditional when finding clinched system_region_mileage values
jteresco
commented
Mar 22, 2022
Contributor
all good to go to production? |
yakra
commented
Mar 22, 2022
ContributorAuthor
Good to go. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The first 5 commits are rebased from the last 5 in #505.
.0appended to integer values, to nearmisspoints.log & tm-master.nmp.TravelerList.The last 2 commits are redos of the first 2 in #505.
There are several ways to more effectively use C++'s
std::unordered_mapclass. Changes that would have conflicted with the first 2 commits of #505 are redone here; other items can be explored in the future.Both before & after #505, time was wasted by searching hash tables twice -- once to determine membership and again to get the value for a given key.
Before, we at least got the result of
std::unordered_map::find, even if only to use it as a temporary & then just discard it.Here, that result gets saved & used a 2nd time, avoiding that 2nd lookup.
Plus, we get rid of that unnecessary membership test as done in c8b3c98, described with the code snippets in #505's OP. Not its own separate commit this time around.