swiften: remove glibc-2.26 assert workaround

This commit is contained in:
Michael Gehring 2017-10-10 16:04:21 +00:00
parent 0f0a584d3d
commit 77419cf7ba

View file

@ -1,70 +0,0 @@
--- Swiften/Avatars/AvatarManagerImpl.cpp.orig 2016-02-26 16:48:56.000000000 +0000
+++ Swiften/Avatars/AvatarManagerImpl.cpp 2017-09-22 19:52:58.365265262 +0000
@@ -58,7 +58,7 @@
void AvatarManagerImpl::handleCombinedAvatarChanged(const JID& jid) {
boost::optional<std::string> hash = combinedAvatarProvider.getAvatarHash(jid);
- assert(hash);
+ assert(static_cast<bool>(hash));
offlineAvatarManager->setAvatar(jid, *hash);
onAvatarChanged(jid);
}
--- Swiften/Parser/PayloadParsers/StorageParser.cpp.orig 2016-02-26 16:48:56.000000000 +0000
+++ Swiften/Parser/PayloadParsers/StorageParser.cpp 2017-09-22 19:59:20.339284968 +0000
@@ -16,14 +16,14 @@
void StorageParser::handleStartElement(const std::string& element, const std::string&, const AttributeMap& attributes) {
if (level == BookmarkLevel) {
if (element == "conference") {
- assert(!room);
+ assert(!static_cast<bool>(room));
room = Storage::Room();
room->autoJoin = attributes.getBoolAttribute("autojoin", false);
room->jid = JID(attributes.getAttribute("jid"));
room->name = attributes.getAttribute("name");
}
else if (element == "url") {
- assert(!url);
+ assert(!static_cast<bool>(url));
url = Storage::URL();
url->name = attributes.getAttribute("name");
url->url = attributes.getAttribute("url");
@@ -39,12 +39,12 @@
--level;
if (level == BookmarkLevel) {
if (element == "conference") {
- assert(room);
+ assert(static_cast<bool>(room));
getPayloadInternal()->addRoom(*room);
room.reset();
}
else if (element == "url") {
- assert(url);
+ assert(static_cast<bool>(url));
getPayloadInternal()->addURL(*url);
url.reset();
}
--- Swiften/Parser/PayloadParsers/SearchPayloadParser.cpp.orig 2016-02-26 16:48:56.000000000 +0000
+++ Swiften/Parser/PayloadParsers/SearchPayloadParser.cpp 2017-09-22 20:08:46.417314171 +0000
@@ -26,11 +26,11 @@
}
else if (level == PayloadLevel) {
if (element == "x" && ns == "jabber:x:data") {
- assert(!formParser);
+ assert(!static_cast<bool>(formParser));
formParser = boost::polymorphic_downcast<FormParser*>(formParserFactory->createPayloadParser());
}
else if (element == "item") {
- assert(!currentItem);
+ assert(!static_cast<bool>(currentItem));
currentItem.reset(SearchPayload::Item());
currentItem->jid = JID(attributes.getAttribute("jid"));
}
@@ -65,7 +65,7 @@
formParser = NULL;
}
else if (element == "item") {
- assert(currentItem);
+ assert(static_cast<bool>(currentItem));
getPayloadInternal()->addItem(*currentItem);
currentItem.reset();
}