fix minor memory leask

This commit is contained in:
ado 2022-03-27 21:41:46 +02:00
parent a8fa5c753c
commit 27d0a2f33e
4 changed files with 7 additions and 5 deletions

View File

@ -3,10 +3,10 @@
/usr/local/include/ss/splitter.hpp /usr/local/include/ss/splitter.hpp
/usr/local/include/ss/common.hpp /usr/local/include/ss/common.hpp
/usr/local/include/ss/type_traits.hpp /usr/local/include/ss/type_traits.hpp
/usr/local/include/ss/converter.hpp
/usr/local/include/ss/extract.hpp /usr/local/include/ss/extract.hpp
/usr/local/include/ss/setup.hpp /usr/local/include/ss/setup.hpp
/usr/local/include/ss/parser.hpp /usr/local/include/ss/parser.hpp
/usr/local/include/ss/converter.hpp
/usr/local/include/fast_float/ascii_number.h /usr/local/include/fast_float/ascii_number.h
/usr/local/include/fast_float/decimal_to_binary.h /usr/local/include/fast_float/decimal_to_binary.h
/usr/local/include/fast_float/fast_float.h /usr/local/include/fast_float/fast_float.h

View File

@ -509,7 +509,7 @@ private:
helper_buffer_{other.helper_buffer_}, converter_{std::move( helper_buffer_{other.helper_buffer_}, converter_{std::move(
other.converter_)}, other.converter_)},
next_line_converter_{std::move(other.next_line_converter_)}, next_line_converter_{std::move(other.next_line_converter_)},
size_{other.size_}, next_line_size_{other.size_}, size_{other.size_}, next_line_size_{other.next_line_size_},
helper_size_{other.helper_size_}, delim_{std::move(other.delim_)}, helper_size_{other.helper_size_}, delim_{std::move(other.delim_)},
file_{other.file_}, crlf_{other.crlf_}, line_number_{ file_{other.file_}, crlf_{other.crlf_}, line_number_{
other.line_number_} { other.line_number_} {

View File

@ -1,9 +1,9 @@
test_sources = files([ test_sources = files([
'test_main.cpp', 'test_main.cpp',
#'test_splitter.cpp', 'test_splitter.cpp',
#'test_converter.cpp', 'test_converter.cpp',
'test_parser.cpp', 'test_parser.cpp',
#'test_extractions.cpp', 'test_extractions.cpp',
]) ])
doctest_proj = subproject('doctest') doctest_proj = subproject('doctest')

View File

@ -108,6 +108,8 @@ TEST_CASE("parser test various cases") {
make_and_write(f.name, data); make_and_write(f.name, data);
{ {
ss::parser<ss::string_error> p{f.name, ","}; ss::parser<ss::string_error> p{f.name, ","};
ss::parser p0{std::move(p)};
p = std::move(p0);
std::vector<X> i; std::vector<X> i;
ss::parser<ss::string_error> p2{f.name, ","}; ss::parser<ss::string_error> p2{f.name, ","};