From 5ad49454f158a40583d2633571068b2885acbbbc Mon Sep 17 00:00:00 2001 From: seelabs Date: Tue, 18 Jul 2017 13:30:59 -0400 Subject: [PATCH] Remove unused lambda captures --- src/ripple/app/paths/impl/FlowDebugInfo.h | 6 +++--- src/test/app/Flow_test.cpp | 2 +- src/test/app/Offer_test.cpp | 2 +- src/test/protocol/STTx_test.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ripple/app/paths/impl/FlowDebugInfo.h b/src/ripple/app/paths/impl/FlowDebugInfo.h index 62d484190..f0334d514 100644 --- a/src/ripple/app/paths/impl/FlowDebugInfo.h +++ b/src/ripple/app/paths/impl/FlowDebugInfo.h @@ -229,21 +229,21 @@ struct FlowDebugInfo } ostr << ']'; }; - auto writeXrpAmtList = [&ostr, &write_list]( + auto writeXrpAmtList = [&write_list]( std::vector const& amts, char delim=';') { auto get_val = [](EitherAmount const& a) -> std::string { return ripple::to_string (a.xrp); }; write_list (amts, get_val, delim); }; - auto writeIouAmtList = [&ostr, &write_list]( + auto writeIouAmtList = [&write_list]( std::vector const& amts, char delim=';') { auto get_val = [](EitherAmount const& a) -> std::string { return ripple::to_string (a.iou); }; write_list (amts, get_val, delim); }; - auto writeIntList = [&ostr, &write_list]( + auto writeIntList = [&write_list]( std::vector const& vals, char delim=';') { auto get_val = []( size_t const& v) -> size_t const& { return v; }; diff --git a/src/test/app/Flow_test.cpp b/src/test/app/Flow_test.cpp index 5b04ec087..521addc5c 100644 --- a/src/test/app/Flow_test.cpp +++ b/src/test/app/Flow_test.cpp @@ -783,7 +783,7 @@ struct Flow_test : public beast::unit_test::suite { std::vector> result; forEachItem (*env.current (), account, - [&env, &result](std::shared_ptr const& sle) + [&result](std::shared_ptr const& sle) { if (sle->getType() == ltOFFER) result.push_back (sle); diff --git a/src/test/app/Offer_test.cpp b/src/test/app/Offer_test.cpp index 861a9baa5..db6685409 100644 --- a/src/test/app/Offer_test.cpp +++ b/src/test/app/Offer_test.cpp @@ -569,7 +569,7 @@ public: { std::vector> result; forEachItem (*env.current (), account, - [&env, &result](std::shared_ptr const& sle) + [&result](std::shared_ptr const& sle) { if (sle->getType() == ltOFFER) result.push_back (sle); diff --git a/src/test/protocol/STTx_test.cpp b/src/test/protocol/STTx_test.cpp index 4e7ad6a6c..54795b39a 100644 --- a/src/test/protocol/STTx_test.cpp +++ b/src/test/protocol/STTx_test.cpp @@ -128,7 +128,7 @@ public: // This lambda contains the bulk of the test code. auto testMalformedSigningAccount = - [this, &txn, &id1] + [this, &txn] (STObject const& signer, bool expectPass) { // Create SigningAccounts array.