Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements in const correctness and 'const' positioning #3510

Merged
merged 6 commits into from
Oct 21, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nano/lib/errors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ nano::error & nano::error::on_error (std::error_code code_a, std::string message
/** Set an error message and an error code */
nano::error & nano::error::set (std::string message_a, std::error_code code_a)
{
message = message_a;
message = std::move (message_a);
code = code_a;
return *this;
}
Expand All @@ -486,6 +486,7 @@ nano::error & nano::error::clear ()
return *this;
}

// TODO: theoretically, nothing besides template (partial) specializations should ever be added inside std...
theohax marked this conversation as resolved.
Show resolved Hide resolved
namespace std
{
std::error_code make_error_code (boost::system::errc::errc_t const & e)
Expand Down