Skip to content

Commit

Permalink
Removed std::move operation for trivially copyable types. This was pr…
Browse files Browse the repository at this point in the history
…ompted by relevant compiler warnings about the redundancy of std::move() operation on such types.

- unused imports were also removed from a unit test file
  • Loading branch information
ckeshava committed Jun 9, 2023
1 parent ee01651 commit f3a5731
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/ripple/rpc/handlers/AccountObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include <ripple/app/main/Application.h>
#include <ripple/app/tx/impl/details/NFTokenUtils.h>
#include <ripple/json/json_writer.h>
#include <ripple/ledger/ReadView.h>
#include <ripple/net/RPCErr.h>
#include <ripple/protocol/ErrorCodes.h>
Expand Down Expand Up @@ -66,7 +65,7 @@ doAccountNFTs(RPC::JsonContext& context)
RPC::inject_error(rpcACT_MALFORMED, result);
return result;
}
auto const accountID{std::move(id.value())};
auto const accountID{id.value()};

if (!ledger->exists(keylet::account(accountID)))
return rpcError(rpcACT_NOT_FOUND);
Expand Down Expand Up @@ -179,7 +178,7 @@ doAccountObjects(RPC::JsonContext& context)
RPC::inject_error(rpcACT_MALFORMED, result);
return result;
}
auto const accountID{std::move(id.value())};
auto const accountID{id.value()};

if (!ledger->exists(keylet::account(accountID)))
return rpcError(rpcACT_NOT_FOUND);
Expand Down
1 change: 0 additions & 1 deletion src/test/rpc/ReportingETL_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
//==============================================================================

#include <ripple/app/ledger/LedgerMaster.h>
#include <ripple/app/reporting/P2pProxy.h>
#include <ripple/beast/unit_test.h>
#include <ripple/rpc/impl/Tuning.h>
Expand Down

0 comments on commit f3a5731

Please sign in to comment.