From 5248ec0c110feddc0b73c751f065c83519d5b921 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Sat, 26 Mar 2022 09:58:29 +0100 Subject: [PATCH] Move CORBA ORB in the constructor to prevent a copy --- tests/ami_test/ami/ami_test_i.cpp | 14 +++++++------- tests/ami_test/ami_in_out_inout/ami_test_i.cpp | 2 +- tests/ami_test/annotations/ami_test_i.cpp | 2 +- .../ami_test/exceptions/collocation/ami_coll_i.cpp | 2 +- tests/ami_test/ostream/test_i.cpp | 2 +- tests/ami_test/replyhandler/test_i.cpp | 2 +- tests/ami_test/use_of_gca/ami_test_i.cpp | 13 ++++++------- tests/ami_test/weak_ref/ami_test_i.cpp | 3 +-- tests/any/anynonstandardtc/foo.cpp | 2 +- tests/any/corbaseq/hello.cpp | 2 +- tests/custom_format/custom_format_impl.cpp | 2 +- tests/factory/hello.cpp | 4 ++-- tests/hello_regen/test_impl.cpp | 2 +- tests/interface/hello.cpp | 2 +- tests/ior_table/forwarding/test_i.cpp | 2 +- tests/ior_table/ior_table/hello.cpp | 2 +- tests/ior_table/locator/server.cpp | 2 +- tests/is_equivalent/hello.cpp | 4 ++-- tests/mt/mt_bidir/server_task.cpp | 2 +- tests/mt/mt_client/test_i.cpp | 2 +- tests/mt/mt_server/server.cpp | 2 +- tests/mt/mt_server/test_i.cpp | 2 +- tests/obv/any/anys_impl.cpp | 2 +- tests/obv/forward/test_impl.cpp | 2 +- tests/obv/supports/supports_test_impl.cpp | 2 +- tests/ostreamnamespace/foo.cpp | 2 +- tests/poa/adapter_activator/server.cpp | 2 +- tests/poa/currentservant/hello.cpp | 2 +- tests/poa/forwarding/servant_activator.cpp | 2 +- tests/poa/forwarding/test_i.cpp | 2 +- tests/poa/generic_servant/test_i.cpp | 2 +- tests/poa/loader/servant_activator.cpp | 2 +- tests/poa/loader/servant_locator.cpp | 2 +- tests/poa/this/hello.cpp | 2 +- tests/policies/oneway_timeouts/server.cpp | 2 +- .../policies/reliable_oneways/oneway_receiver.cpp | 2 +- .../policies/reliable_oneways/shutdown_helper.cpp | 2 +- tests/sequence/foo.cpp | 2 +- tests/struct/foo.cpp | 2 +- tests/timebase/hello.cpp | 2 +- tests/write_traits/write_traits_impl.cpp | 2 +- tests/wstring/hello.cpp | 2 +- 42 files changed, 55 insertions(+), 57 deletions(-) diff --git a/tests/ami_test/ami/ami_test_i.cpp b/tests/ami_test/ami/ami_test_i.cpp index b2bef1e3..b4f4f4f7 100644 --- a/tests/ami_test/ami/ami_test_i.cpp +++ b/tests/ami_test/ami/ami_test_i.cpp @@ -10,13 +10,13 @@ #include "ami_test_i.h" AMI_Test_i::AMI_Test_i (IDL::traits::ref_type orb) - : orb_ (orb), - yadda_ ((int32_t) 140474), - in_l_ ((int32_t) 931247), - in_l_last_ ((int32_t) 931235), - attr_bool_(true), - in_str_("Let's talk AMI."), - in_str_last_("Let's talk AMI the last time.") + : orb_ (std::move(orb)), + yadda_ ((int32_t) 140474), + in_l_ ((int32_t) 931247), + in_l_last_ ((int32_t) 931235), + attr_bool_(true), + in_str_("Let's talk AMI."), + in_str_last_("Let's talk AMI the last time.") { } diff --git a/tests/ami_test/ami_in_out_inout/ami_test_i.cpp b/tests/ami_test/ami_in_out_inout/ami_test_i.cpp index 334c53db..2db1f58c 100644 --- a/tests/ami_test/ami_in_out_inout/ami_test_i.cpp +++ b/tests/ami_test/ami_in_out_inout/ami_test_i.cpp @@ -11,7 +11,7 @@ #include AMI_Test_i::AMI_Test_i (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/ami_test/annotations/ami_test_i.cpp b/tests/ami_test/annotations/ami_test_i.cpp index c099ba19..1d57d38e 100644 --- a/tests/ami_test/annotations/ami_test_i.cpp +++ b/tests/ami_test/annotations/ami_test_i.cpp @@ -10,7 +10,7 @@ #include "ami_test_i.h" AMI_Test_i::AMI_Test_i (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/ami_test/exceptions/collocation/ami_coll_i.cpp b/tests/ami_test/exceptions/collocation/ami_coll_i.cpp index ae797d66..11212d79 100644 --- a/tests/ami_test/exceptions/collocation/ami_coll_i.cpp +++ b/tests/ami_test/exceptions/collocation/ami_coll_i.cpp @@ -213,7 +213,7 @@ Foo::Foo (IDL::traits::ref_type orb, IDL::traits::ref_type bar, CORBA::amic_traits::replyhandler_ref_type bar_handler, CORBA::amic_traits::ref_type ami_bar_client) - : orb_ (orb) + : orb_ (std::move(orb)) , bar_ (bar) , bar_handler_ (bar_handler) , ami_bar_client_ (ami_bar_client) diff --git a/tests/ami_test/ostream/test_i.cpp b/tests/ami_test/ostream/test_i.cpp index 1a2779c5..0ea9a27e 100644 --- a/tests/ami_test/ostream/test_i.cpp +++ b/tests/ami_test/ostream/test_i.cpp @@ -10,7 +10,7 @@ #include "test_i.h" Test_i::Test_i (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/ami_test/replyhandler/test_i.cpp b/tests/ami_test/replyhandler/test_i.cpp index 127855d5..a341afd1 100644 --- a/tests/ami_test/replyhandler/test_i.cpp +++ b/tests/ami_test/replyhandler/test_i.cpp @@ -10,7 +10,7 @@ #include "test_i.h" Test_i::Test_i (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { yadda_ = 0; } diff --git a/tests/ami_test/use_of_gca/ami_test_i.cpp b/tests/ami_test/use_of_gca/ami_test_i.cpp index e41dac6a..bf9bb00d 100644 --- a/tests/ami_test/use_of_gca/ami_test_i.cpp +++ b/tests/ami_test/use_of_gca/ami_test_i.cpp @@ -9,13 +9,12 @@ #include "ami_test_i.h" -AMI_Test_i::AMI_Test_i (IDL::traits::ref_type orb - ) - : orb_ (orb), - yadda_ ((int32_t) 0), - in_l_ ((int32_t) 931247), - inout_l_ ((int32_t) 300), - in_l_last_ ((int32_t) 931235) +AMI_Test_i::AMI_Test_i (IDL::traits::ref_type orb) + : orb_ (std::move(orb)), + yadda_ ((int32_t) 0), + in_l_ ((int32_t) 931247), + inout_l_ ((int32_t) 300), + in_l_last_ ((int32_t) 931235) { } int32_t diff --git a/tests/ami_test/weak_ref/ami_test_i.cpp b/tests/ami_test/weak_ref/ami_test_i.cpp index 94726238..3cc52459 100644 --- a/tests/ami_test/weak_ref/ami_test_i.cpp +++ b/tests/ami_test/weak_ref/ami_test_i.cpp @@ -10,8 +10,7 @@ #include "ami_test_i.h" AMI_Test_i::AMI_Test_i (IDL::traits::ref_type orb) - - : orb_ (orb) + : orb_ (std::move(orb)) { } int32_t diff --git a/tests/any/anynonstandardtc/foo.cpp b/tests/any/anynonstandardtc/foo.cpp index 545642c4..f2db7872 100644 --- a/tests/any/anynonstandardtc/foo.cpp +++ b/tests/any/anynonstandardtc/foo.cpp @@ -10,7 +10,7 @@ #include "testlib/taox11_testlog.h" Foo::Foo (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/any/corbaseq/hello.cpp b/tests/any/corbaseq/hello.cpp index aab124d5..b61d8080 100644 --- a/tests/any/corbaseq/hello.cpp +++ b/tests/any/corbaseq/hello.cpp @@ -8,7 +8,7 @@ #include "testlib/taox11_testlog.h" Hello::Hello (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/custom_format/custom_format_impl.cpp b/tests/custom_format/custom_format_impl.cpp index 8fec2c04..8f0aee82 100644 --- a/tests/custom_format/custom_format_impl.cpp +++ b/tests/custom_format/custom_format_impl.cpp @@ -27,7 +27,7 @@ namespace Test // your constructor(s) Foo_impl::Foo_impl (IDL::traits::ref_type orb) : CORBA::servant_traits< ::Test::Foo>::base_type (), - orb_ (orb) + orb_ (std::move(orb)) { // your constructor body } diff --git a/tests/factory/hello.cpp b/tests/factory/hello.cpp index 9ac62472..85a4ce71 100644 --- a/tests/factory/hello.cpp +++ b/tests/factory/hello.cpp @@ -9,7 +9,7 @@ #include "hello.h" Hello::Hello (IDL::traits::ref_type orb, IDL::traits::ref_type factory) - : orb_ (orb), factory_(factory) + : orb_ (std::move(orb)), factory_(factory) { } @@ -41,7 +41,7 @@ Hello::shutdown () Hello_Factory::Hello_Factory (IDL::traits::ref_type orb, IDL::traits::ref_type poa) - : orb_ (orb), + : orb_ (std::move(orb)), poa_ (poa) { } diff --git a/tests/hello_regen/test_impl.cpp b/tests/hello_regen/test_impl.cpp index b94e050f..ea47af9e 100644 --- a/tests/hello_regen/test_impl.cpp +++ b/tests/hello_regen/test_impl.cpp @@ -63,7 +63,7 @@ namespace Test //@@{__RIDL_REGEN_MARKER__} - BEGIN : Test::Hello[Constructors] Hello::Hello (IDL::traits::ref_type orb) : CORBA::servant_traits< ::Test::Hello>::base_type () - , orb_ (orb) + , orb_ (std::move(orb)) { } //@@{__RIDL_REGEN_MARKER__} - END : Test::Hello[Constructors] diff --git a/tests/interface/hello.cpp b/tests/interface/hello.cpp index 39fe8514..00828e47 100644 --- a/tests/interface/hello.cpp +++ b/tests/interface/hello.cpp @@ -94,7 +94,7 @@ iF_impl::_cxx_do() iFactory_impl::iFactory_impl ( IDL::traits::ref_type orb, IDL::traits::ref_type poa) - : orb_ (orb), poa_ (poa) + : orb_ (std::move(orb)), poa_ (poa) { } diff --git a/tests/ior_table/forwarding/test_i.cpp b/tests/ior_table/forwarding/test_i.cpp index 6c7d60ed..a93c8cde 100644 --- a/tests/ior_table/forwarding/test_i.cpp +++ b/tests/ior_table/forwarding/test_i.cpp @@ -9,7 +9,7 @@ #include "test_i.h" Simple_Server_i::Simple_Server_i (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/ior_table/ior_table/hello.cpp b/tests/ior_table/ior_table/hello.cpp index 96ef8eba..9d22039a 100644 --- a/tests/ior_table/ior_table/hello.cpp +++ b/tests/ior_table/ior_table/hello.cpp @@ -10,7 +10,7 @@ Hello::Hello (IDL::traits::ref_type orb, bool rebinded) - : orb_ (orb) + : orb_ (std::move(orb)) , rebinded_ (rebinded) { } diff --git a/tests/ior_table/locator/server.cpp b/tests/ior_table/locator/server.cpp index 568f6801..50bf99a5 100644 --- a/tests/ior_table/locator/server.cpp +++ b/tests/ior_table/locator/server.cpp @@ -104,7 +104,7 @@ class Task final Task::Task (IDL::traits::ref_type orb, bool test_not_found) - : orb_ (orb) + : orb_ (std::move(orb)) , test_not_found_ (test_not_found) { } diff --git a/tests/is_equivalent/hello.cpp b/tests/is_equivalent/hello.cpp index fb42c76b..d21d0642 100644 --- a/tests/is_equivalent/hello.cpp +++ b/tests/is_equivalent/hello.cpp @@ -11,7 +11,7 @@ #include "testlib/taox11_testlog.h" Hello::Hello (IDL::traits::ref_type orb, IDL::traits::ref_type factory) - : orb_ (orb), factory_(factory) + : orb_ (std::move(orb)), factory_(factory) { } @@ -88,7 +88,7 @@ Hello::equivalent_hello (IDL::traits::ref_type h) Hello_Factory::Hello_Factory (IDL::traits::ref_type orb, IDL::traits::ref_type poa) - : orb_ (orb), + : orb_ (std::move(orb)), poa_ (poa) { } diff --git a/tests/mt/mt_bidir/server_task.cpp b/tests/mt/mt_bidir/server_task.cpp index 0b66acc9..fce11d14 100644 --- a/tests/mt/mt_bidir/server_task.cpp +++ b/tests/mt/mt_bidir/server_task.cpp @@ -21,7 +21,7 @@ Server_Task::Server_Task (CORBA::servant_reference sender, , sender_ (sender) , event_ (event) , no_iterations_ (no_iterations) - , orb_ (orb) + , orb_ (std::move(orb)) { } diff --git a/tests/mt/mt_client/test_i.cpp b/tests/mt/mt_client/test_i.cpp index cbd5c82d..5d986537 100644 --- a/tests/mt/mt_client/test_i.cpp +++ b/tests/mt/mt_client/test_i.cpp @@ -9,7 +9,7 @@ #include "test_i.h" Simple_Server_i::Simple_Server_i (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/mt/mt_server/server.cpp b/tests/mt/mt_server/server.cpp index 187f1019..274205af 100644 --- a/tests/mt/mt_server/server.cpp +++ b/tests/mt/mt_server/server.cpp @@ -152,7 +152,7 @@ main(int argc, char *argv[]) // **************************************************************** Worker::Worker (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/mt/mt_server/test_i.cpp b/tests/mt/mt_server/test_i.cpp index 9af8cd0a..8c956660 100644 --- a/tests/mt/mt_server/test_i.cpp +++ b/tests/mt/mt_server/test_i.cpp @@ -12,7 +12,7 @@ #include "testlib/taox11_testlog.h" Simple_Server_i::Simple_Server_i (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/obv/any/anys_impl.cpp b/tests/obv/any/anys_impl.cpp index b12edbc9..1371a087 100644 --- a/tests/obv/any/anys_impl.cpp +++ b/tests/obv/any/anys_impl.cpp @@ -12,7 +12,7 @@ #define MAGIC 3145 Test_impl::Test_impl (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/obv/forward/test_impl.cpp b/tests/obv/forward/test_impl.cpp index 8aa328d2..f46b8874 100644 --- a/tests/obv/forward/test_impl.cpp +++ b/tests/obv/forward/test_impl.cpp @@ -11,7 +11,7 @@ #include "treebaseC.h" Test_impl::Test_impl (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/obv/supports/supports_test_impl.cpp b/tests/obv/supports/supports_test_impl.cpp index b2d69b65..71c8558c 100644 --- a/tests/obv/supports/supports_test_impl.cpp +++ b/tests/obv/supports/supports_test_impl.cpp @@ -77,7 +77,7 @@ vt_graph_init_impl::create_for_unmarshal () /* test_impl */ -test_impl::test_impl (CORBA::ORB::_ref_type orb) : orb_ (orb) +test_impl::test_impl (CORBA::ORB::_ref_type orb) : orb_ (std::move(orb)) { } diff --git a/tests/ostreamnamespace/foo.cpp b/tests/ostreamnamespace/foo.cpp index ad87e21d..0784379e 100644 --- a/tests/ostreamnamespace/foo.cpp +++ b/tests/ostreamnamespace/foo.cpp @@ -7,7 +7,7 @@ #include "foo.h" Foo::Foo (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/poa/adapter_activator/server.cpp b/tests/poa/adapter_activator/server.cpp index b4251aca..9d0f5bdb 100644 --- a/tests/poa/adapter_activator/server.cpp +++ b/tests/poa/adapter_activator/server.cpp @@ -38,7 +38,7 @@ MyAdapter_Activator::MyAdapter_Activator (IDL::traits::ref_type orb) : - orb_ (orb) + orb_ (std::move(orb)) { } diff --git a/tests/poa/forwarding/servant_activator.cpp b/tests/poa/forwarding/servant_activator.cpp index b4fd25ee..d74df948 100644 --- a/tests/poa/forwarding/servant_activator.cpp +++ b/tests/poa/forwarding/servant_activator.cpp @@ -15,7 +15,7 @@ ServantActivator::ServantActivator ( IDL::traits::ref_type orb, IDL::traits::ref_type forward_to) - : orb_ (orb) + : orb_ (std::move(orb)) , forward_to_ (forward_to) { } diff --git a/tests/poa/forwarding/test_i.cpp b/tests/poa/forwarding/test_i.cpp index 76fef889..d8c74938 100644 --- a/tests/poa/forwarding/test_i.cpp +++ b/tests/poa/forwarding/test_i.cpp @@ -12,7 +12,7 @@ test_i::test_i (IDL::traits::ref_type orb, IDL::traits::ref_type poa, IDL::traits::weak_ref_type activator, int32_t value) - : orb_ (orb), + : orb_ (std::move(orb)), poa_ (poa), activator_ (activator), value_ (value) diff --git a/tests/poa/generic_servant/test_i.cpp b/tests/poa/generic_servant/test_i.cpp index f5024f3a..bdd5049b 100644 --- a/tests/poa/generic_servant/test_i.cpp +++ b/tests/poa/generic_servant/test_i.cpp @@ -17,7 +17,7 @@ // Constructor test_i::test_i (IDL::traits::ref_type orb, IDL::traits::ref_type poa) - : orb_ (orb), + : orb_ (std::move(orb)), poa_ (poa) { } diff --git a/tests/poa/loader/servant_activator.cpp b/tests/poa/loader/servant_activator.cpp index 0415bf7c..dff27243 100644 --- a/tests/poa/loader/servant_activator.cpp +++ b/tests/poa/loader/servant_activator.cpp @@ -17,7 +17,7 @@ ServantActivator::ServantActivator (IDL::traits::ref_type orb, const std::string& dllname, const std::string& factory_function) - : orb_ (orb), result_(0) + : orb_ (std::move(orb)), result_(0) { // The dll is opened using the dllname passed. if (this->dll_.open (dllname.c_str()) == -1) diff --git a/tests/poa/loader/servant_locator.cpp b/tests/poa/loader/servant_locator.cpp index 847df388..480cd920 100644 --- a/tests/poa/loader/servant_locator.cpp +++ b/tests/poa/loader/servant_locator.cpp @@ -18,7 +18,7 @@ ServantLocator::ServantLocator (IDL::traits::ref_type orb, const std::string& dllname, const std::string& factory_function) - : orb_ (orb), result_(0) + : orb_ (std::move(orb)), result_(0) { // The dll is opened using the dllname passed. if (this->dll_.open (dllname.c_str()) == -1) diff --git a/tests/poa/this/hello.cpp b/tests/poa/this/hello.cpp index 2a10ef0b..a59f2a34 100644 --- a/tests/poa/this/hello.cpp +++ b/tests/poa/this/hello.cpp @@ -12,7 +12,7 @@ #include "testlib/taox11_testlog.h" Hello::Hello(IDL::traits::ref_type orb) : - orb_ (orb) + orb_ (std::move(orb)) { } diff --git a/tests/policies/oneway_timeouts/server.cpp b/tests/policies/oneway_timeouts/server.cpp index 21ee69c8..296c279f 100644 --- a/tests/policies/oneway_timeouts/server.cpp +++ b/tests/policies/oneway_timeouts/server.cpp @@ -100,7 +100,7 @@ class Tester_i final }; Tester_i::Tester_i (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) , id1_ (0) , id2_ (0) , count_ (0) diff --git a/tests/policies/reliable_oneways/oneway_receiver.cpp b/tests/policies/reliable_oneways/oneway_receiver.cpp index 266812bd..009e4a57 100644 --- a/tests/policies/reliable_oneways/oneway_receiver.cpp +++ b/tests/policies/reliable_oneways/oneway_receiver.cpp @@ -11,7 +11,7 @@ Oneway_Receiver::Oneway_Receiver ( IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/policies/reliable_oneways/shutdown_helper.cpp b/tests/policies/reliable_oneways/shutdown_helper.cpp index 79774804..ff287b8c 100644 --- a/tests/policies/reliable_oneways/shutdown_helper.cpp +++ b/tests/policies/reliable_oneways/shutdown_helper.cpp @@ -9,7 +9,7 @@ #include "shutdown_helper.h" Shutdown_Helper::Shutdown_Helper (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/sequence/foo.cpp b/tests/sequence/foo.cpp index 9b028997..332b2024 100644 --- a/tests/sequence/foo.cpp +++ b/tests/sequence/foo.cpp @@ -52,7 +52,7 @@ TestBounded::test_bounded_ret () Foo::Foo (IDL::traits::ref_type orb, IDL::traits::ref_type poa) - : orb_ (orb) + : orb_ (std::move(orb)) , poa_ (poa) { } diff --git a/tests/struct/foo.cpp b/tests/struct/foo.cpp index a3c76ab4..a4fe87fd 100644 --- a/tests/struct/foo.cpp +++ b/tests/struct/foo.cpp @@ -7,7 +7,7 @@ #include "foo.h" Foo::Foo (IDL::traits::ref_type orb) - : orb_ (orb) + : orb_ (std::move(orb)) { } diff --git a/tests/timebase/hello.cpp b/tests/timebase/hello.cpp index 89af8b96..49878cda 100644 --- a/tests/timebase/hello.cpp +++ b/tests/timebase/hello.cpp @@ -27,7 +27,7 @@ Hello::equal_const(const TimeBase::UtcT& utc, TimeBase::UtcT& utc2) const } Hello::Hello(IDL::traits::ref_type orb, int& result) : - orb_ (orb), result_ (result) + orb_ (std::move(orb)), result_ (result) { } diff --git a/tests/write_traits/write_traits_impl.cpp b/tests/write_traits/write_traits_impl.cpp index 9e66492d..2ce39b1e 100644 --- a/tests/write_traits/write_traits_impl.cpp +++ b/tests/write_traits/write_traits_impl.cpp @@ -28,7 +28,7 @@ namespace Test // your constructor(s) Foo_impl::Foo_impl (IDL::traits::ref_type orb) : CORBA::servant_traits< ::Test::Foo>::base_type (), - orb_ (orb) + orb_ (std::move(orb)) { // your constructor body } diff --git a/tests/wstring/hello.cpp b/tests/wstring/hello.cpp index 63e0dba2..ad28aafb 100644 --- a/tests/wstring/hello.cpp +++ b/tests/wstring/hello.cpp @@ -13,7 +13,7 @@ #include "testdata.h" Hello::Hello(IDL::traits::ref_type orb, int& result) - : orb_ (orb) + : orb_ (std::move(orb)) , result_ (result) { }