From 02d5013e47076d56bad46355381b544957a312fa Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 29 Jun 2022 09:05:05 +0200 Subject: [PATCH] Layout changes --- examples/ami/client.cpp | 25 ++++++++++--------------- examples/ami/server.cpp | 5 ++--- examples/ami/test_i.h | 4 +--- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/examples/ami/client.cpp b/examples/ami/client.cpp index 333f2226..b56e823a 100644 --- a/examples/ami/client.cpp +++ b/examples/ami/client.cpp @@ -42,15 +42,14 @@ parse_args (int argc, ACE_TCHAR *argv[]) return true; } -class Handler -:public virtual CORBA::amic_traits::replyhandler_base_type +class Handler : public virtual CORBA::amic_traits::replyhandler_base_type { public: /// Constructor. Handler () = default; /// Destructor. - ~Handler () = default; + ~Handler () override = default; void foo (int32_t ami_return_val) override { @@ -63,8 +62,7 @@ class Handler } } - void foo_excep ( - IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override + void foo_excep (IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override { taox11_info << "Callback method called."<< std::endl; } @@ -76,8 +74,7 @@ class Handler << std::endl; } - void get_yadda_excep ( - IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override + void get_yadda_excep (IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override { taox11_info << "Callback method called." << std::endl; } @@ -87,8 +84,7 @@ class Handler taox11_info << "Callback method called:"<< std::endl; } - void set_yadda_excep ( - IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override + void set_yadda_excep (IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override { taox11_info << "Callback method called." << std::endl; } @@ -97,8 +93,7 @@ class Handler { } - void shutdown_excep ( - IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override + void shutdown_excep (IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override { } }; @@ -337,9 +332,9 @@ int main(int argc, char* argv[]) _orb->destroy (); } catch (const std::exception& e) - { - taox11_error << "exception caught: " << e << std::endl; - return 1; - } + { + taox11_error << "exception caught: " << e << std::endl; + return 1; + } return result; } diff --git a/examples/ami/server.cpp b/examples/ami/server.cpp index 12c3d0ec..7ffeed74 100644 --- a/examples/ami/server.cpp +++ b/examples/ami/server.cpp @@ -24,7 +24,7 @@ main(int argc, ACE_TCHAR *argv[]) { IDL::traits::ref_type _orb = CORBA::ORB_init (argc, argv); - if (_orb == nullptr) + if (!_orb) { taox11_error << "ERROR: CORBA::ORB_init (argc, argv) returned null ORB." @@ -71,7 +71,6 @@ main(int argc, ACE_TCHAR *argv[]) CORBA::servant_traits::ref_type a_impl = CORBA::make_reference (_orb); - taox11_info << "created Test::A servant" << std::endl; PortableServer::ObjectId id = root_poa->activate_object (a_impl); @@ -81,7 +80,7 @@ main(int argc, ACE_TCHAR *argv[]) IDL::traits::ref_type a_obj = root_poa->id_to_reference (id); - if (a_obj == nullptr) + if (!a_obj) { taox11_error << "ERROR: root_poa->id_to_reference (id) returned null reference." diff --git a/examples/ami/test_i.h b/examples/ami/test_i.h index e11ac21a..c453fe31 100644 --- a/examples/ami/test_i.h +++ b/examples/ami/test_i.h @@ -13,11 +13,9 @@ #include "testS.h" -class A_i -: public virtual CORBA::servant_traits::base_type +class A_i : public virtual CORBA::servant_traits::base_type { public: - /// ctor A_i (IDL::traits::ref_type orb); // The methods of interface A.