File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,8 +77,7 @@ class ViewReader {
7777 std::stringstream stream;
7878 stream << " Failed to parse field '" << name
7979 << " ': " << res.error ().what ();
80- auto err = Error{stream.str ()};
81- _errors->emplace_back (std::move (err));
80+ _errors->emplace_back (Error (stream.str ()));
8281 return ;
8382 }
8483 if constexpr (std::is_pointer_v<OriginalType>) {
@@ -110,8 +109,7 @@ class ViewReader {
110109 std::stringstream stream;
111110 stream << " Failed to parse field '" << _current_name
112111 << " ': " << res.error ().what ();
113- auto err = Error{stream.str ()};
114- _errors->emplace_back (std::move (err));
112+ _errors->emplace_back (Error (stream.str ()));
115113 return ;
116114 }
117115 extra_fields->emplace (std::string (_current_name), std::move (*res));
@@ -146,8 +144,7 @@ class ViewReader {
146144 if (!already_assigned) {
147145 std::stringstream stream;
148146 stream << " Value named '" << _current_name_or_index << " ' not used." ;
149- auto err = Error{stream.str ()};
150- _errors->emplace_back (std::move (err));
147+ _errors->emplace_back (Error (stream.str ()));
151148 }
152149 }
153150 }
You can’t perform that action at this time.
0 commit comments