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/LinkLocal/LinkLocalServiceInfo.cpp
parentb19210aa48e7cea40929593daed997668fe789be (diff)
downloadswift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.zip
swift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.tar.bz2
Enable & fix pedantic CLang warnings.
Change-Id: I70109624b4bd7aab9ba679a3eaabc225dd64a03a
Diffstat (limited to 'Swiften/LinkLocal/LinkLocalServiceInfo.cpp')
-rw-r--r--Swiften/LinkLocal/LinkLocalServiceInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/LinkLocal/LinkLocalServiceInfo.cpp b/Swiften/LinkLocal/LinkLocalServiceInfo.cpp
index 516d303..19e0249 100644
--- a/Swiften/LinkLocal/LinkLocalServiceInfo.cpp
+++ b/Swiften/LinkLocal/LinkLocalServiceInfo.cpp
@@ -7,6 +7,7 @@
#include <Swiften/LinkLocal/LinkLocalServiceInfo.h>
#include <boost/lexical_cast.hpp>
+#include <boost/numeric/conversion/cast.hpp>
#include <Swiften/Base/Algorithm.h>
#include <Swiften/Base/Concat.h>
@@ -49,7 +50,7 @@ ByteArray LinkLocalServiceInfo::toTXTRecord() const {
ByteArray LinkLocalServiceInfo::getEncoded(const std::string& s) {
ByteArray sizeByte;
sizeByte.resize(1);
- sizeByte[0] = s.size();
+ sizeByte[0] = boost::numeric_cast<unsigned char>(s.size());
return concat(sizeByte, createByteArray(s));
}