summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-30 16:47:37 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-30 18:03:54 (GMT)
commit96b31c598f5c229c3acc0579ddfe22dd503e2b9d (patch)
treed73db22e591e49f088f359b9876df232eb99c6a9 /Swiften/Network/BoostConnection.cpp
parentb19210aa48e7cea40929593daed997668fe789be (diff)
downloadswift-contrib-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.zip
swift-contrib-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.tar.bz2
Enable & fix pedantic CLang warnings.
Change-Id: I70109624b4bd7aab9ba679a3eaabc225dd64a03a
Diffstat (limited to 'Swiften/Network/BoostConnection.cpp')
-rw-r--r--Swiften/Network/BoostConnection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/Network/BoostConnection.cpp b/Swiften/Network/BoostConnection.cpp
index 1d4bd32..5137c3c 100644
--- a/Swiften/Network/BoostConnection.cpp
+++ b/Swiften/Network/BoostConnection.cpp
@@ -14,6 +14,7 @@
#include <boost/asio/placeholders.hpp>
#include <boost/asio/write.hpp>
#include <boost/smart_ptr/make_shared.hpp>
+#include <boost/numeric/conversion/cast.hpp>
#include <Swiften/Base/Log.h>
#include <Swiften/Base/Algorithm.h>
@@ -63,7 +64,7 @@ void BoostConnection::listen() {
void BoostConnection::connect(const HostAddressPort& addressPort) {
boost::asio::ip::tcp::endpoint endpoint(
- boost::asio::ip::address::from_string(addressPort.getAddress().toString()), addressPort.getPort());
+ boost::asio::ip::address::from_string(addressPort.getAddress().toString()), boost::numeric_cast<unsigned short>(addressPort.getPort()));
socket_.async_connect(
endpoint,
boost::bind(&BoostConnection::handleConnectFinished, shared_from_this(), boost::asio::placeholders::error));