summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-08-01 10:38:12 (GMT)
committerTobias Markmann <tm@ayena.de>2018-08-01 10:38:12 (GMT)
commit07b3b882ade8ed454e304963e4f238e867608c46 (patch)
tree081ca26019274704bfe3139e7a166c60ce586b86
parent0007bbfa11e74f2a76aebc83995843ee8f6840ab (diff)
downloadswift-07b3b882ade8ed454e304963e4f238e867608c46.zip
swift-07b3b882ade8ed454e304963e4f238e867608c46.tar.bz2
Avoid lvalue and simplify boolean expression
Test-Information: Builds and unit tests pass on macOS with clang 7 master. Change-Id: I0bf2828db49dfb6a7e99c78f1d2f7e76e87f8ca1
-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
@@ -120,7 +120,7 @@ void BasicSessionStream::addTLSEncryption() {
120} 120}
121 121
122bool BasicSessionStream::isTLSEncrypted() { 122bool BasicSessionStream::isTLSEncrypted() {
123 return streamStack->getLayer<TLSLayer>() != nullptr; 123 return streamStack->getLayer<TLSLayer>();
124} 124}
125 125
126Certificate::ref BasicSessionStream::getPeerCertificate() const { 126Certificate::ref BasicSessionStream::getPeerCertificate() const {
@@ -144,8 +144,7 @@ bool BasicSessionStream::supportsZLibCompression() {
144} 144}
145 145
146void BasicSessionStream::addZLibCompression() { 146void BasicSessionStream::addZLibCompression() {
147 auto compressionLayer = std::make_unique<CompressionLayer>(); 147 streamStack->addLayer(std::make_unique<CompressionLayer>());
148 streamStack->addLayer(std::move(compressionLayer));
149} 148}
150 149
151void BasicSessionStream::setWhitespacePingEnabled(bool enabled) { 150void BasicSessionStream::setWhitespacePingEnabled(bool enabled) {