File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,14 +20,10 @@ class HalfVector {
2020 explicit HalfVector (const std::vector<float >& value) : value_{value} {}
2121
2222 // / Creates a half vector from a `std::vector<float>`.
23- explicit HalfVector (std::vector<float >&& value) {
24- value_ = std::move (value);
25- }
23+ explicit HalfVector (std::vector<float >&& value) : value_{std::move (value)} {}
2624
2725 // / Creates a half vector from a span.
28- explicit HalfVector (std::span<const float > value) {
29- value_ = std::vector<float >(value.begin (), value.end ());
30- }
26+ explicit HalfVector (std::span<const float > value) : value_{std::vector<float >(value.begin (), value.end ())} {}
3127
3228 // / Returns the number of dimensions.
3329 size_t dimensions () const {
Original file line number Diff line number Diff line change @@ -20,14 +20,10 @@ class Vector {
2020 explicit Vector (const std::vector<float >& value) : value_{value} {}
2121
2222 // / Creates a vector from a `std::vector<float>`.
23- explicit Vector (std::vector<float >&& value) {
24- value_ = std::move (value);
25- }
23+ explicit Vector (std::vector<float >&& value) : value_{std::move (value)} {}
2624
2725 // / Creates a vector from a span.
28- explicit Vector (std::span<const float > value) {
29- value_ = std::vector<float >(value.begin (), value.end ());
30- }
26+ explicit Vector (std::span<const float > value) : value_{std::vector<float >(value.begin (), value.end ())} {}
3127
3228 // / Returns the number of dimensions.
3329 size_t dimensions () const {
You can’t perform that action at this time.
0 commit comments