You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/12/30 22:13:15 UTC

[27/50] [abbrv] qpid-proton git commit: NO-JIRA: fix C++ valgrind error from d9c0ed5

NO-JIRA: fix C++ valgrind error from d9c0ed5


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/a4a21be8
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/a4a21be8
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/a4a21be8

Branch: refs/heads/go1
Commit: a4a21be85b5a322c7e8edcf879663d5841285985
Parents: 32fa7cb
Author: Clifford Jansen <cl...@apache.org>
Authored: Mon Dec 14 16:49:09 2015 -0800
Committer: Clifford Jansen <cl...@apache.org>
Committed: Mon Dec 14 16:49:09 2015 -0800

----------------------------------------------------------------------
 proton-c/bindings/cpp/include/proton/ssl.hpp | 1 +
 proton-c/bindings/cpp/src/ssl_domain.cpp     | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a4a21be8/proton-c/bindings/cpp/include/proton/ssl.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/ssl.hpp b/proton-c/bindings/cpp/include/proton/ssl.hpp
index 609e7e2..579a57f 100644
--- a/proton-c/bindings/cpp/include/proton/ssl.hpp
+++ b/proton-c/bindings/cpp/include/proton/ssl.hpp
@@ -84,6 +84,7 @@ class ssl_domain {
   protected:
     ssl_domain(bool is_server);
     pn_ssl_domain_t *pn_domain();
+    void swap(ssl_domain &);
 
   private:
     ssl_domain_impl *impl_;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a4a21be8/proton-c/bindings/cpp/src/ssl_domain.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/ssl_domain.cpp b/proton-c/bindings/cpp/src/ssl_domain.cpp
index 9062713..d6c427b 100644
--- a/proton-c/bindings/cpp/src/ssl_domain.cpp
+++ b/proton-c/bindings/cpp/src/ssl_domain.cpp
@@ -60,14 +60,13 @@ ssl_domain::ssl_domain(const ssl_domain &x) {
     impl_->incref();
 }
 ssl_domain& ssl_domain::operator=(const ssl_domain&x) {
-    if (this != &x) {
-        impl_ = x.impl_;
-        impl_->incref();
-    }
+    ssl_domain(x).swap(*this);
     return *this;
 }
 ssl_domain::~ssl_domain() { impl_->decref(); }
 
+void ssl_domain::swap(ssl_domain &x) { std::swap(impl_, x.impl_); }
+
 pn_ssl_domain_t *ssl_domain::pn_domain() { return impl_->pn_domain(); }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org