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: solvespace/solvespace
base: 97c8cb7d710a
Choose a base ref
...
head repository: solvespace/solvespace
compare: b284e807857d
Choose a head ref
  • 17 commits
  • 38 files changed
  • 2 contributors

Commits on Aug 20, 2019

  1. Convert many loops to range-for or std algorithms. NFC.

    Also add comments about indexing and when we don't use range-for.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    86f20cc View commit details
    Browse the repository at this point in the history
  2. Provide cbegin(), cend() in containers. NFC.

    Allows forcing const iteration.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    b5f36a4 View commit details
    Browse the repository at this point in the history
  3. Add and use IdList::IsEmpty. NFC.

    Removes consuming code from the implementation details, easing swap of
    the underlying container, etc.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    5ada4db View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0c941ae View commit details
    Browse the repository at this point in the history
  5. Add and use LowerBound methods in IdList. NFC.

    Clearer and less error-prone to use standard-supplied algorithms.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    3340392 View commit details
    Browse the repository at this point in the history
  6. Simplify IdList::Add(). NFC.

    Offloads most of the work onto standard algorithms to make it
    more self-evidently correct.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    60fdac1 View commit details
    Browse the repository at this point in the history
  7. Reduce scopes and placate clang-tidy. NFC.

    Pointing out one potential issue with an assert.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    3ea077b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0bb6a34 View commit details
    Browse the repository at this point in the history
  9. Add and use List<T>::IsEmpty, range-for, etc. NFC.

    Changes resemble those already made to IdList.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    1b97a00 View commit details
    Browse the repository at this point in the history
  10. Replace qsort with std::sort and lambda. NFC.

    Removes static variable usage, permits hiding of the underlying pointer
    (std::sort uses iterators intead), type safety, etc.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    482f0e8 View commit details
    Browse the repository at this point in the history
  11. Improve implementation hiding in IdList/List. NFC.

    Allows distancing users from the internal "elem" member.
    
    Add Get() and operator[].
    Replace direct references to elem.
    Make elem and elemsAllocated private in IdList/List.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    0bfbbe2 View commit details
    Browse the repository at this point in the history
  12. Add IdList::AllocForOneMore() based on List. NFC.

    Also modifies a sizeof call.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    9fd09dd View commit details
    Browse the repository at this point in the history
  13. Improve MoveSelfInto. NFC.

    std::swap is an idiomatic way to do a move.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    b9d035c View commit details
    Browse the repository at this point in the history
  14. Improve Clear(). NFC.

    Was getting segfaults near here with another patch since removed from the branch.
    Moving these assignments after the memfree means they still have
    useful data when debugging a crash in memfree.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    610e35f View commit details
    Browse the repository at this point in the history
  15. Add Last(). NFC.

    Counterpart of First().  standard library calls this "back()".
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    dd738dd View commit details
    Browse the repository at this point in the history
  16. Fix a manual manipulation of List::n. NFC.

    This broke encapsulation and thus caused problems for any deeper changes
    to List.
    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    533ca61 View commit details
    Browse the repository at this point in the history
  17. Improve NextAfter. NFC.

    rpavlik authored and whitequark committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    b284e80 View commit details
    Browse the repository at this point in the history