summaryrefslogtreecommitdiff
path: root/src/DHTMessageFactoryImpl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/DHTMessageFactoryImpl.cc')
-rw-r--r--src/DHTMessageFactoryImpl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/DHTMessageFactoryImpl.cc b/src/DHTMessageFactoryImpl.cc
index 5e64e564..81407c80 100644
--- a/src/DHTMessageFactoryImpl.cc
+++ b/src/DHTMessageFactoryImpl.cc
@@ -428,8 +428,8 @@ DHTMessageFactoryImpl::createGetPeersReplyMessage
std::vector<std::shared_ptr<Peer>> peers;
size_t clen = bittorrent::getCompactLength(family_);
if(valuesList) {
- for(auto i = valuesList->begin(), eoi = valuesList->end(); i != eoi; ++i) {
- const String* data = downcast<String>(*i);
+ for(auto & elem : *valuesList) {
+ const String* data = downcast<String>(elem);
if(data && data->s().size() == clen) {
auto addr = bittorrent::unpackcompact(data->uc(), family_);
if(addr.first.empty()) {