Skip to content

Commit efaaa33

Browse files
Revert "Move the errs"
This reverts commit d06d5f6.
1 parent d06d5f6 commit efaaa33

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

include/rfl/parsing/ViewReader.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)