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: 700f72a78091
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1bf799867cd3
Choose a head ref
  • 3 commits
  • 1 file changed
  • 1 contributor

Commits on Aug 11, 2019

  1. Avoid unbounded behavior.

    pleroy committed Aug 11, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b0ba718 View commit details
  2. Typos.

    pleroy committed Aug 11, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0dff847 View commit details

Commits on Aug 12, 2019

  1. Merge pull request #2281 from pleroy/2261a

    Avoid a unbounded behavior introduced in #2279
    pleroy authored Aug 12, 2019
    Copy the full SHA
    1bf7998 View commit details
Showing with 8 additions and 8 deletions.
  1. +8 −8 physics/forkable_body.hpp
16 changes: 8 additions & 8 deletions physics/forkable_body.hpp
Original file line number Diff line number Diff line change
@@ -24,14 +24,14 @@ bool ForkableIterator<Tr4jectory, It3rator>::operator==(
DCHECK_EQ(trajectory(), right.trajectory());
// The comparison of iterators is faster than the comparison of deques, so if
// this function returns false (which it does repeatedly in loops), it might
// as well do so quickly. However, we may end up comparing iterators from
// different containers, and in debug mode this is detected as a failure.
// Trust me, I know what I am doing.
#if defined(_DEBUG)
return ancestry_ == right.ancestry_ && current_ == right.current_;
#else
return current_ == right.current_ && ancestry_ == right.ancestry_;
#endif
// as well do so quickly. There is a complication, however, because the two
// iterators may not point to the same container, and we believe that
// comparing them would be undefined behaviour; hence the size comparison,
// which ensures that the two iterators are in the same fork and therefore can
// legitimately be compared.
return ancestry_.size() == right.ancestry_.size() &&
current_ == right.current_ &&
ancestry_ == right.ancestry_;
}

template<typename Tr4jectory, typename It3rator>