Skip to content

Commit 7bda624

Browse files
committed
Improved code [skip ci]
1 parent ccc5dce commit 7bda624

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/pgvector/pqxx.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ template <> struct string_traits<pgvector::Vector> {
3737

3838
// TODO don't copy string
3939
std::vector<float> result;
40-
std::stringstream ss(std::string(text.substr(1, text.size() - 2)));
40+
std::istringstream ss(std::string(text.substr(1, text.size() - 2)));
4141
while (ss.good()) {
4242
std::string substr;
4343
std::getline(ss, substr, ',');
@@ -82,7 +82,7 @@ template <> struct string_traits<pgvector::HalfVector> {
8282

8383
// TODO don't copy string
8484
std::vector<float> result;
85-
std::stringstream ss(std::string(text.substr(1, text.size() - 2)));
85+
std::istringstream ss(std::string(text.substr(1, text.size() - 2)));
8686
while (ss.good()) {
8787
std::string substr;
8888
std::getline(ss, substr, ',');

0 commit comments

Comments
 (0)