File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,8 +206,8 @@ template <> struct string_traits<pgvector::SparseVector> {
206206
207207 static std::string_view to_buf (std::span<char > buf, const pgvector::SparseVector& value, ctx c = {}) {
208208 int dimensions = value.dimensions ();
209- auto indices = value.indices ();
210- auto values = value.values ();
209+ auto & indices = value.indices ();
210+ auto & values = value.values ();
211211 size_t nnz = indices.size ();
212212
213213 // important! size_buffer cannot throw an exception on overflow
@@ -237,8 +237,8 @@ template <> struct string_traits<pgvector::SparseVector> {
237237
238238 static size_t size_buffer (const pgvector::SparseVector& value) noexcept {
239239 int dimensions = value.dimensions ();
240- auto indices = value.indices ();
241- auto values = value.values ();
240+ auto & indices = value.indices ();
241+ auto & values = value.values ();
242242 size_t nnz = indices.size ();
243243
244244 // cannot throw an exception here on overflow
You can’t perform that action at this time.
0 commit comments