From debc69baccc42e2fb96c0990cf9a00af4baf95ce Mon Sep 17 00:00:00 2001 From: Tobias Markmann <tm@ayena.de> Date: Thu, 3 May 2018 12:45:23 +0200 Subject: Replace BOOST_AUTO with C++11 auto keyword Test-Information: Code builds on macOS 10.13.4 with clang trunk. Change-Id: Ia80ef02701f93e32447a471b2398ba8a3cc29c32 diff --git a/Swiften/FileTransfer/JingleFileTransfer.cpp b/Swiften/FileTransfer/JingleFileTransfer.cpp index 62c3a53..cc1cd1c 100644 --- a/Swiften/FileTransfer/JingleFileTransfer.cpp +++ b/Swiften/FileTransfer/JingleFileTransfer.cpp @@ -1,13 +1,11 @@ /* - * Copyright (c) 2013-2016 Isode Limited. + * Copyright (c) 2013-2018 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/FileTransfer/JingleFileTransfer.h> -#include <boost/typeof/typeof.hpp> - #include <Swiften/Base/Log.h> #include <Swiften/Crypto/CryptoProvider.h> #include <Swiften/FileTransfer/FileTransferTransporter.h> @@ -29,7 +27,6 @@ JingleFileTransfer::JingleFileTransfer( theirCandidateSelectFinished(false) { session->addListener(this); - } JingleFileTransfer::~JingleFileTransfer() { @@ -176,7 +173,7 @@ void JingleFileTransfer::handleTransportInfoReceived( theirCandidateSelectFinished = true; if (!s5bPayload->hasCandidateError()) { - BOOST_AUTO(theirCandidate, localCandidates.find(s5bPayload->getCandidateUsed())); + auto theirCandidate = localCandidates.find(s5bPayload->getCandidateUsed()); if (theirCandidate == localCandidates.end()) { SWIFT_LOG(warning) << "Got invalid candidate" << std::endl; terminate(JinglePayload::Reason::GeneralError); @@ -231,4 +228,3 @@ void JingleFileTransfer::removeTransporter() { transporter = nullptr; } } - 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]); } -- cgit v0.10.2-6-g49f6