summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-05-31 08:49:23 (GMT)
committerTobias Markmann <tm@ayena.de>2016-05-31 08:49:23 (GMT)
commitf5a08101e59abef6a4696bcaa2b5381e133dfbb4 (patch)
treec07fd432c819a6b67c0fce349b92de102a0b8b20 /Swift/Controllers
parentb5fc545c5f19d35c877514b30ba07303d0c9793d (diff)
downloadswift-f5a08101e59abef6a4696bcaa2b5381e133dfbb4.zip
swift-f5a08101e59abef6a4696bcaa2b5381e133dfbb4.tar.bz2
Fix serialization code in response to VS 2013 warning
cl.exe from VS 2013 warns about a negative integral constant converted to unsigned type (C4308). This is worked around by using the & operator instead of the << operator, which also allows serialization but does not cause the warning. Test-Information: Tested on Windows 8 with Visual Studio 2013. The build does not cause the warnings on the affected files anymore. Change-Id: I53d82361cb07e36e96e0ff1398e6fb1b35bb01fa
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/ChatsManager.cpp2
-rw-r--r--Swift/Controllers/HighlightManager.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index be0af3e..e8b85c4 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -230,7 +230,7 @@ void ChatsManager::saveRecents() {
recentsLimited.erase(std::remove_if(recentsLimited.begin(), recentsLimited.end(), RemoveRecent::ifPrivateMessage), recentsLimited.end());
- oa << recentsLimited;
+ oa & recentsLimited;
std::string serializedStr = Base64::encode(createByteArray(serializeStream.str()));
profileSettings_->storeString(RECENT_CHATS, serializedStr);
}
diff --git a/Swift/Controllers/HighlightManager.cpp b/Swift/Controllers/HighlightManager.cpp
index fab0ac5..2afaf49 100644
--- a/Swift/Controllers/HighlightManager.cpp
+++ b/Swift/Controllers/HighlightManager.cpp
@@ -65,7 +65,7 @@ void HighlightManager::handleSettingChanged(const std::string& settingPath) {
std::string HighlightManager::rulesToString() const {
std::stringstream stream;
boost::archive::text_oarchive archive(stream);
- archive << rules_->list_;
+ archive & rules_->list_;
return stream.str();
}