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: bb26e7047ea5
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 039ef8545425
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 8, 2018

  1. Fix array construction.

    pleroy committed Apr 8, 2018
    Copy the full SHA
    efd4989 View commit details
  2. Merge pull request #1795 from pleroy/Linux

    Fix array construction
    pleroy authored Apr 8, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    infinisil Silvan Mosberger
    Copy the full SHA
    039ef85 View commit details
Showing with 5 additions and 9 deletions.
  1. +5 −2 numerics/fixed_arrays.hpp
  2. +0 −7 numerics/fixed_arrays_body.hpp
7 changes: 5 additions & 2 deletions numerics/fixed_arrays.hpp
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ class FixedMatrix;
template<typename Scalar, int size_>
class FixedVector final {
public:
constexpr FixedVector(); // Zero-initialized.
constexpr FixedVector() = default;
constexpr explicit FixedVector(std::array<Scalar, size_> const& data);
constexpr explicit FixedVector(std::array<Scalar, size_>&& data);
FixedVector(
@@ -36,7 +36,10 @@ class FixedVector final {
static constexpr int size = size_;

private:
std::array<Scalar, size> data_;
// This member is aggregate-initialized with an empty list initializer, which
// performs value initialization on the components. For quantities this calls
// the default constructor, for non-class types this does zero-initialization.
std::array<Scalar, size> data_{};

template<typename L, typename R, int r, int c>
friend FixedVector<Product<L, R>, r> operator*(
7 changes: 0 additions & 7 deletions numerics/fixed_arrays_body.hpp
Original file line number Diff line number Diff line change
@@ -47,13 +47,6 @@ DotProduct<ScalarLeft, ScalarRight, size, 0>::Compute(Left const& left,
return left[0] * right[0];
}

template<typename Scalar, int size_>
constexpr FixedVector<Scalar, size_>::FixedVector() {
for (auto& element : data_) {
element = {};
}
}

template<typename Scalar, int size_>
constexpr FixedVector<Scalar, size_>::FixedVector(
std::array<Scalar, size_> const& data)