summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Elements/Message.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/Swiften/Elements/Message.h b/Swiften/Elements/Message.h
index f276ef7..c357cd4 100644
--- a/Swiften/Elements/Message.h
+++ b/Swiften/Elements/Message.h
@@ -39,10 +39,8 @@ namespace Swift {
updatePayload(std::make_shared<Subject>(subject));
}
- // Explicitly convert to bool. In C++11, it would be cleaner to
- // compare to nullptr.
bool hasSubject() {
- return static_cast<bool>(getPayload<Subject>());
+ return getPayload<Subject>() != nullptr;
}
boost::optional<std::string> getBody() const {