From 6edce88d79bc56723831ead6b49281adcc32e4c1 Mon Sep 17 00:00:00 2001 From: ado Date: Tue, 25 Jul 2023 00:36:53 +0200 Subject: [PATCH] Fix bug where the default delimiter would be used for multiline data --- include/ss/converter.hpp | 2 +- include/ss/parser.hpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/ss/converter.hpp b/include/ss/converter.hpp index 3650576..0cb4f80 100644 --- a/include/ss/converter.hpp +++ b/include/ss/converter.hpp @@ -194,7 +194,7 @@ private: //////////////// const split_data& resplit(line_ptr_type new_line, ssize_t new_size, - const std::string& delim = default_delimiter) { + const std::string& delim) { return splitter_.resplit(new_line, new_size, delim); } diff --git a/include/ss/parser.hpp b/include/ss/parser.hpp index d22cf45..4ad4df4 100644 --- a/include/ss/parser.hpp +++ b/include/ss/parser.hpp @@ -152,7 +152,7 @@ public: struct iterable { struct iterator { using value = std::conditional_t>; + no_void_validator_tup_t>; iterator() : parser_{nullptr} { } @@ -623,7 +623,8 @@ private: } } - next_line_converter_.resplit(next_line_buffer_, size); + next_line_converter_.resplit(next_line_buffer_, size, + delim_); } }