diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-09-16 20:16:37 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-09-17 18:25:40 (GMT) |
commit | 4a8cf892743284265bcc8bf9c6fbc4747aa86089 (patch) | |
tree | ff223fa5638790d9f0643ddf8baf8c50f68f3186 /Swiften/Client | |
parent | 56a3f51b12b4fc2328cb76be58d623eb5a1f63e4 (diff) | |
download | swift-4a8cf892743284265bcc8bf9c6fbc4747aa86089.zip swift-4a8cf892743284265bcc8bf9c6fbc4747aa86089.tar.bz2 |
Don't use implicit bool conversion on shared_ptr
C++11 doesn't have implicit conversion to bool on shared_ptr.
The cleanest fix is to compare against nullptr, but this only
works on C++11.
Change-Id: Ia2b4b5d90f99aa24c4f3bdf0d680343754e32ec2
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/ClientSession.h | 4 |
1 files changed, 3 insertions, 1 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 { |