summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swiften/Client/ClientSession.h4
-rw-r--r--Swiften/Elements/Message.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/Swiften/Client/ClientSession.h b/Swiften/Client/ClientSession.h
index 6ef624e..4b944fc 100644
--- a/Swiften/Client/ClientSession.h
+++ b/Swiften/Client/ClientSession.h
@@ -94,7 +94,9 @@ namespace Swift {
bool getStreamManagementEnabled() const {
- return stanzaAckRequester_;
+ // Explicitly convert to bool. In C++11, it would be cleaner to
+ // compare to nullptr.
+ return static_cast<bool>(stanzaAckRequester_);
}
bool getRosterVersioningSupported() const {
diff --git a/Swiften/Elements/Message.h b/Swiften/Elements/Message.h
index 3b9145c..ea99814 100644
--- a/Swiften/Elements/Message.h
+++ b/Swiften/Elements/Message.h
@@ -38,8 +38,10 @@ namespace Swift {
updatePayload(boost::make_shared<Subject>(subject));
}
+ // Explicitly convert to bool. In C++11, it would be cleaner to
+ // compare to nullptr.
bool hasSubject() {
- return getPayload<Subject>();
+ return static_cast<bool>(getPayload<Subject>());
}
std::string getBody() const {