summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-05-03 10:45:23 (GMT)
committerTobias Markmann <tm@ayena.de>2018-05-03 10:45:23 (GMT)
commitdebc69baccc42e2fb96c0990cf9a00af4baf95ce (patch)
tree60b5b5538a025437adbd5459767a8c5aa65ddb0b /Swiften/Network
parent288783ebcce760bc43a1fe5156edbf7525268c67 (diff)
downloadswift-debc69baccc42e2fb96c0990cf9a00af4baf95ce.zip
swift-debc69baccc42e2fb96c0990cf9a00af4baf95ce.tar.bz2
Replace BOOST_AUTO with C++11 auto keyword
Test-Information: Code builds on macOS 10.13.4 with clang trunk. Change-Id: Ia80ef02701f93e32447a471b2398ba8a3cc29c32
Diffstat (limited to 'Swiften/Network')
-rw-r--r--Swiften/Network/DomainNameServiceQuery.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Swiften/Network/DomainNameServiceQuery.cpp b/Swiften/Network/DomainNameServiceQuery.cpp
index 708bbce..0c6c543 100644
--- a/Swiften/Network/DomainNameServiceQuery.cpp
+++ b/Swiften/Network/DomainNameServiceQuery.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2018 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -14,7 +14,6 @@
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/typeof/typeof.hpp>
#include <Swiften/Base/RandomGenerator.h>
@@ -53,7 +52,7 @@ void DomainNameServiceQuery::sortResults(std::vector<DomainNameServiceQuery::Res
weights.end(),
std::back_inserter(cumulativeWeights));
int randomNumber = generator.generateRandomInteger(cumulativeWeights.back());
- BOOST_AUTO(selectedIndex, std::lower_bound(cumulativeWeights.begin(), cumulativeWeights.end(), randomNumber) - cumulativeWeights.begin());
+ auto selectedIndex = std::lower_bound(cumulativeWeights.begin(), cumulativeWeights.end(), randomNumber) - cumulativeWeights.begin();
std::swap(i[j], i[j + selectedIndex]);
std::swap(weights.begin()[j], weights.begin()[j + selectedIndex]);
}