summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-01-06 14:56:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-01-13 10:06:37 (GMT)
commit188fc285c6555eadd3c9d50ab8a94adcade78d89 (patch)
treef02f5e249f8b511300d55a826d3b727f9d8d844f /Swift/Controllers/FileTransfer
parentd5cab0388f6a40db6156a993e5f00acf9e63b577 (diff)
downloadswift-contrib-188fc285c6555eadd3c9d50ab8a94adcade78d89.zip
swift-contrib-188fc285c6555eadd3c9d50ab8a94adcade78d89.tar.bz2
Fix more warnings.
Fix sign conversion warnings. Removing heavy unnecessary includes. Change-Id: I992f43065498823098a875badb020c7c84fc4797
Diffstat (limited to 'Swift/Controllers/FileTransfer')
-rw-r--r--Swift/Controllers/FileTransfer/FileTransferController.cpp1
-rw-r--r--Swift/Controllers/FileTransfer/FileTransferProgressInfo.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/Swift/Controllers/FileTransfer/FileTransferController.cpp b/Swift/Controllers/FileTransfer/FileTransferController.cpp
index d4a082a..69b5c89 100644
--- a/Swift/Controllers/FileTransfer/FileTransferController.cpp
+++ b/Swift/Controllers/FileTransfer/FileTransferController.cpp
@@ -10,6 +10,7 @@
#include <Swiften/FileTransfer/FileReadBytestream.h>
#include <Swiften/Base/boost_bsignals.h>
#include <boost/bind.hpp>
+#include <boost/filesystem.hpp>
#include "Swift/Controllers/UIInterfaces/ChatWindow.h"
#include <Swiften/Base/Log.h>
#include <Swift/Controllers/Intl.h>
diff --git a/Swift/Controllers/FileTransfer/FileTransferProgressInfo.cpp b/Swift/Controllers/FileTransfer/FileTransferProgressInfo.cpp
index 6d19fa1..3081f71 100644
--- a/Swift/Controllers/FileTransfer/FileTransferProgressInfo.cpp
+++ b/Swift/Controllers/FileTransfer/FileTransferProgressInfo.cpp
@@ -6,6 +6,8 @@
#include "FileTransferProgressInfo.h"
+#include <boost/numeric/conversion/cast.hpp>
+
#include <Swiften/Base/Log.h>
namespace Swift {
@@ -16,7 +18,7 @@ FileTransferProgressInfo::FileTransferProgressInfo(boost::uintmax_t completeByte
void FileTransferProgressInfo::setBytesProcessed(int processedBytes) {
int oldPercentage = int(double(completedBytes) / double(completeBytes) * 100.0);
- completedBytes += processedBytes;
+ completedBytes += boost::numeric_cast<boost::uintmax_t>(processedBytes);
int newPercentage = int(double(completedBytes) / double(completeBytes) * 100.0);
if (oldPercentage != newPercentage) {
onProgressPercentage(newPercentage);