summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Session/BasicSessionStream.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Swiften/Session/BasicSessionStream.cpp b/Swiften/Session/BasicSessionStream.cpp
index 183b986..3e65640 100644
--- a/Swiften/Session/BasicSessionStream.cpp
+++ b/Swiften/Session/BasicSessionStream.cpp
@@ -118,11 +118,11 @@ void BasicSessionStream::addTLSEncryption() {
tlsLayer->connect();
}
}
bool BasicSessionStream::isTLSEncrypted() {
- return streamStack->getLayer<TLSLayer>() != nullptr;
+ return streamStack->getLayer<TLSLayer>();
}
Certificate::ref BasicSessionStream::getPeerCertificate() const {
return streamStack->getLayer<TLSLayer>()->getPeerCertificate();
}
@@ -142,12 +142,11 @@ ByteArray BasicSessionStream::getTLSFinishMessage() const {
bool BasicSessionStream::supportsZLibCompression() {
return true;
}
void BasicSessionStream::addZLibCompression() {
- auto compressionLayer = std::make_unique<CompressionLayer>();
- streamStack->addLayer(std::move(compressionLayer));
+ streamStack->addLayer(std::make_unique<CompressionLayer>());
}
void BasicSessionStream::setWhitespacePingEnabled(bool enabled) {
auto whitespacePingLayer = streamStack->getLayer<WhitespacePingLayer>();
if (enabled) {