Skip to content

Commit

Permalink
Remove redundant std::move noted by gcc 9.2 (-Wredundant-move)
Browse files Browse the repository at this point in the history
  • Loading branch information
garethsb committed Mar 26, 2020
1 parent cdae258 commit 53fab3a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Release/src/json/json_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ std::unique_ptr<web::json::details::_Value> JSON_Parser<CharType>::_ParseArray(
case JSON_Parser<CharType>::Token::TKN_CloseBracket:
GetNextToken(tkn);
if (tkn.m_error) return utility::details::make_unique<web::json::details::_Null>();
return std::move(result);
return result;
default:
SetErrorCode(tkn, json_error::malformed_array_literal);
return utility::details::make_unique<web::json::details::_Null>();
Expand Down Expand Up @@ -1074,7 +1074,7 @@ std::unique_ptr<web::json::details::_Value> JSON_Parser<CharType>::_ParseValue(
tkn.has_unescape_symbol);
GetNextToken(tkn);
if (tkn.m_error) return utility::details::make_unique<web::json::details::_Null>();
return std::move(value);
return value;
}
case JSON_Parser<CharType>::Token::TKN_IntegerLiteral:
{
Expand All @@ -1086,21 +1086,21 @@ std::unique_ptr<web::json::details::_Value> JSON_Parser<CharType>::_ParseValue(

GetNextToken(tkn);
if (tkn.m_error) return utility::details::make_unique<web::json::details::_Null>();
return std::move(value);
return value;
}
case JSON_Parser<CharType>::Token::TKN_NumberLiteral:
{
auto value = utility::details::make_unique<web::json::details::_Number>(tkn.double_val);
GetNextToken(tkn);
if (tkn.m_error) return utility::details::make_unique<web::json::details::_Null>();
return std::move(value);
return value;
}
case JSON_Parser<CharType>::Token::TKN_BooleanLiteral:
{
auto value = utility::details::make_unique<web::json::details::_Boolean>(tkn.boolean_val);
GetNextToken(tkn);
if (tkn.m_error) return utility::details::make_unique<web::json::details::_Null>();
return std::move(value);
return value;
}
case JSON_Parser<CharType>::Token::TKN_NullLiteral:
{
Expand Down

0 comments on commit 53fab3a

Please sign in to comment.