summaryrefslogtreecommitdiff
path: root/src/DefaultBtMessageDispatcher.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 19:04:52 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 19:04:52 +0900
commit38d457435534fd06d6278feaf3d9efd471a19746 (patch)
treeec60408e5814a6b34caadb985f21cea4e9fa51ec /src/DefaultBtMessageDispatcher.cc
parent05d85e296563842ab57eb201fb6d11a68cf8fa41 (diff)
Remove forEachMemFunSH in favor of for loop with auto
Diffstat (limited to 'src/DefaultBtMessageDispatcher.cc')
-rw-r--r--src/DefaultBtMessageDispatcher.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/DefaultBtMessageDispatcher.cc b/src/DefaultBtMessageDispatcher.cc
index 9165ec9a..3c64432a 100644
--- a/src/DefaultBtMessageDispatcher.cc
+++ b/src/DefaultBtMessageDispatcher.cc
@@ -125,9 +125,9 @@ void DefaultBtMessageDispatcher::doCancelSendingPieceAction
std::vector<std::shared_ptr<BtMessage> > tempQueue
(messageQueue_.begin(), messageQueue_.end());
-
- forEachMemFunSH(tempQueue.begin(), tempQueue.end(),
- &BtMessage::onCancelSendingPieceEvent, event);
+ for(const auto& i : tempQueue) {
+ i->onCancelSendingPieceEvent(event);
+ }
}
// Cancel sending piece message to peer.
@@ -178,8 +178,9 @@ void DefaultBtMessageDispatcher::doAbortOutstandingRequestAction
std::vector<std::shared_ptr<BtMessage> > tempQueue
(messageQueue_.begin(), messageQueue_.end());
- forEachMemFunSH(tempQueue.begin(), tempQueue.end(),
- &BtMessage::onAbortOutstandingRequestEvent, event);
+ for(const auto& i : tempQueue) {
+ i->onAbortOutstandingRequestEvent(event);
+ }
}
namespace {
@@ -247,8 +248,9 @@ void DefaultBtMessageDispatcher::doChokingAction()
std::vector<std::shared_ptr<BtMessage> > tempQueue
(messageQueue_.begin(), messageQueue_.end());
- forEachMemFunSH(tempQueue.begin(), tempQueue.end(),
- &BtMessage::onChokingEvent, event);
+ for(const auto& i : tempQueue) {
+ i->onChokingEvent(event);
+ }
}
namespace {