Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 431C4200B58 for ; Wed, 27 Jul 2016 13:06:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 41DDA160A90; Wed, 27 Jul 2016 11:06:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 900B2160A6E for ; Wed, 27 Jul 2016 13:06:36 +0200 (CEST) Received: (qmail 32186 invoked by uid 500); 27 Jul 2016 11:06:35 -0000 Mailing-List: contact commits-help@celix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@celix.apache.org Delivered-To: mailing list commits@celix.apache.org Received: (qmail 32177 invoked by uid 99); 27 Jul 2016 11:06:35 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2016 11:06:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A7A00E02A2; Wed, 27 Jul 2016 11:06:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pnoltes@apache.org To: commits@celix.apache.org Message-Id: <65be2b27aa7b43eea36f5b3af7b62dce@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: celix git commit: CELIX-370: Fixes move constructor Date: Wed, 27 Jul 2016 11:06:35 +0000 (UTC) archived-at: Wed, 27 Jul 2016 11:06:37 -0000 Repository: celix Updated Branches: refs/heads/develop 0b617d736 -> 81de941a6 CELIX-370: Fixes move constructor Project: http://git-wip-us.apache.org/repos/asf/celix/repo Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/81de941a Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/81de941a Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/81de941a Branch: refs/heads/develop Commit: 81de941a6b669b5dde9dc17c5950ad4cba97f422 Parents: 0b617d7 Author: Pepijn Noltes Authored: Wed Jul 27 13:05:52 2016 +0200 Committer: Pepijn Noltes Committed: Wed Jul 27 13:05:52 2016 +0200 ---------------------------------------------------------------------- examples/dm_example_cxx/phase2/include/Phase2Cmp.h | 8 +------- examples/dm_example_cxx/phase2a/src/Phase2aCmp.cc | 6 ++++++ 2 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/celix/blob/81de941a/examples/dm_example_cxx/phase2/include/Phase2Cmp.h ---------------------------------------------------------------------- diff --git a/examples/dm_example_cxx/phase2/include/Phase2Cmp.h b/examples/dm_example_cxx/phase2/include/Phase2Cmp.h index cff9d6d..a0de396 100644 --- a/examples/dm_example_cxx/phase2/include/Phase2Cmp.h +++ b/examples/dm_example_cxx/phase2/include/Phase2Cmp.h @@ -34,13 +34,7 @@ extern "C" { class Phase2Cmp : public IPhase2 { public: Phase2Cmp() = default; - Phase2Cmp(Phase2Cmp&& other) : phase1(nullptr), logSrv{nullptr} { - std::cout << "Move constructor Phase2Cmp called\n"; - this->phase1 = phase1; - this->logSrv = logSrv; - other.phase1 = nullptr; - other.logSrv = nullptr; - } + Phase2Cmp(Phase2Cmp&& other); Phase2Cmp(const Phase2Cmp& other) = delete; virtual ~Phase2Cmp() { std::cout << "Destroying Phase2\n"; }; http://git-wip-us.apache.org/repos/asf/celix/blob/81de941a/examples/dm_example_cxx/phase2a/src/Phase2aCmp.cc ---------------------------------------------------------------------- diff --git a/examples/dm_example_cxx/phase2a/src/Phase2aCmp.cc b/examples/dm_example_cxx/phase2a/src/Phase2aCmp.cc index 55e258a..f2af7ec 100644 --- a/examples/dm_example_cxx/phase2a/src/Phase2aCmp.cc +++ b/examples/dm_example_cxx/phase2a/src/Phase2aCmp.cc @@ -22,6 +22,12 @@ #include #include +Phase2Cmp::Phase2Cmp(Phase2Cmp&& other) : phase1(other.phase1), logSrv{other.logSrv} { + std::cout << "Move constructor Phase2Cmp called\n"; + other.phase1 = nullptr; + other.logSrv = nullptr; +} + void Phase2Cmp::setPhase1(IPhase1* phase1) { std::cout << "setting phase1 for phase2\n"; this->phase1 = phase1;