From 2870c7f457c241e099b30d9465bb1f5a681810f0 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 15 Jan 2014 22:08:46 -0500 Subject: [PATCH] Workaround for MSVC std::function bug --- src/ripple_app/consensus/LedgerConsensus.cpp | 2 +- src/ripple_app/peers/PeerSet.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ripple_app/consensus/LedgerConsensus.cpp b/src/ripple_app/consensus/LedgerConsensus.cpp index f4f0ce9088..7659aa3f8d 100644 --- a/src/ripple_app/consensus/LedgerConsensus.cpp +++ b/src/ripple_app/consensus/LedgerConsensus.cpp @@ -799,7 +799,7 @@ public: if (acq != mAcquiring.end ()) getApp().getJobQueue().addJob(jtTXN_DATA, "peerHasTxnData", - std::bind(&TransactionAcquire::peerHas, acq->second, peer)); + std::bind(&TransactionAcquire::peerHasVoid, acq->second, peer)); return true; } diff --git a/src/ripple_app/peers/PeerSet.h b/src/ripple_app/peers/PeerSet.h index 251913da57..0f7571d829 100644 --- a/src/ripple_app/peers/PeerSet.h +++ b/src/ripple_app/peers/PeerSet.h @@ -67,8 +67,18 @@ public: return mLastAction; } + // VFALCO TODO Rename this to addPeerToSet + // bool peerHas (Peer::ref); + + // VFALCO Workaround for MSVC std::function which doesn't swallow return types. + void peerHasVoid (Peer::ref peer) + { + peerHas (peer); + } + void badPeer (Peer::ref); + void setTimer (); int takePeerSetFrom (const PeerSet& s);