Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 81a1c0a834bb
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0bc35571e936
Choose a head ref
  • 11 commits
  • 1 file changed
  • 1 contributor

Commits on Mar 22, 2017

  1. Copy the full SHA
    d8d5684 View commit details
  2. Copy the full SHA
    3b6521b View commit details
  3. Copy the full SHA
    654cf96 View commit details
  4. more interesting logs

    eggrobin committed Mar 22, 2017
    Copy the full SHA
    48eb172 View commit details
  5. Copy the full SHA
    8071f60 View commit details
  6. this is mystifying

    eggrobin committed Mar 22, 2017
    Copy the full SHA
    763b565 View commit details
  7. Copy the full SHA
    f65c471 View commit details
  8. Copy the full SHA
    ef2a9c7 View commit details
  9. Copy the full SHA
    67860f4 View commit details
  10. after pleroy's review

    eggrobin committed Mar 22, 2017
    Copy the full SHA
    3c17375 View commit details
  11. Merge pull request #1279 from eggrobin/docking-mysteries

    Don't spam vessel creations and deletions
    eggrobin authored Mar 22, 2017
    Copy the full SHA
    0bc3557 View commit details
Showing with 12 additions and 8 deletions.
  1. +12 −8 ksp_plugin/plugin.cpp
20 changes: 12 additions & 8 deletions ksp_plugin/plugin.cpp
Original file line number Diff line number Diff line change
@@ -380,14 +380,18 @@ void Plugin::InsertOrKeepVessel(GUID const& vessel_guid,
CHECK(!initializing_);
not_null<Celestial const*> parent =
FindOrDie(celestials_, parent_index).get();
GUIDToOwnedVessel::iterator it;
std::tie(it, inserted) =
vessels_.emplace(vessel_guid,
make_not_null_unique<Vessel>(vessel_guid,
vessel_name,
parent,
ephemeris_.get(),
prediction_parameters_));
auto it = vessels_.find(vessel_guid);
if (it == vessels_.end()) {
std::tie(it, inserted) =
vessels_.emplace(vessel_guid,
make_not_null_unique<Vessel>(vessel_guid,
vessel_name,
parent,
ephemeris_.get(),
prediction_parameters_));
} else {
inserted = false;
}
not_null<Vessel*> const vessel = it->second.get();
if (vessel->name() != vessel_name) {
vessel->set_name(vessel_name);