File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ namespace pgvector {
1717class HalfVector {
1818 public:
1919 // / Creates a half vector from a `std::vector<float>`.
20- explicit HalfVector (const std::vector<float >& value) {
21- value_ = value;
22- }
20+ explicit HalfVector (const std::vector<float >& value) : value_{value} {}
2321
2422 // / Creates a half vector from a `std::vector<float>`.
2523 explicit HalfVector (std::vector<float >&& value) {
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ namespace pgvector {
1717class Vector {
1818 public:
1919 // / Creates a vector from a `std::vector<float>`.
20- explicit Vector (const std::vector<float >& value) {
21- value_ = value;
22- }
20+ explicit Vector (const std::vector<float >& value) : value_{value} {}
2321
2422 // / Creates a vector from a `std::vector<float>`.
2523 explicit Vector (std::vector<float >&& value) {
You can’t perform that action at this time.
0 commit comments