Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc/server: fix removing deprecated commands from command list
The call to std::remove also requires using std::vector::erase This fixes the following warning: /home/lukas/Documents/git/Gridcoin-Research/src/rpc/server.cpp:935:20: warning: ignoring return value of ‘_FIter std::remove(_FIter, _FIter, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterator<__cxx11::basic_string<char>*, vector<__cxx11::basic_string<char> > >; _Tp = const char*]’, declared with attribute ‘nodiscard’ [-Wunused-result] 935 | std::remove(commandList.begin(), commandList.end(), command); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from /home/lukas/Documents/git/Gridcoin-Research/src/span.h:10, from /home/lukas/Documents/git/Gridcoin-Research/src/uint256.h:10, from /home/lukas/Documents/git/Gridcoin-Research/src/consensus/params.h:9, from /home/lukas/Documents/git/Gridcoin-Research/src/chainparams.h:10, from /home/lukas/Documents/git/Gridcoin-Research/src/main.h:10, from /home/lukas/Documents/git/Gridcoin-Research/src/consensus/tx_verify.h:8, from /home/lukas/Documents/git/Gridcoin-Research/src/wallet/wallet.h:16, from /home/lukas/Documents/git/Gridcoin-Research/src/init.h:9, from /home/lukas/Documents/git/Gridcoin-Research/src/rpc/server.cpp:7: /usr/include/c++/14/bits/stl_algo.h:788:5: note: declared here 788 | remove(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~ Signed-off-by: Lukas Rusak <[email protected]>
- Loading branch information