summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2022-10-19 19:56:03 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2022-10-19 19:56:03 +0200
commit3d67b98a644c748826e76a10659add89497c42b5 (patch)
tree62590978abbfb75ac22bf854d5a681c3c5686677
parente815db1b8fe83d68b037c7a61227c736166f9979 (diff)
downloadATCD-3d67b98a644c748826e76a10659add89497c42b5.tar.gz
Use override
* ACE/ace/OS_NS_stropts.cpp: * TAO/tao/PortableServer/Active_Policy_Strategies.cpp: * TAO/tao/PortableServer/ThreadStrategy.h: * TAO/tao/PortableServer/ThreadStrategyFactoryImpl.cpp: * TAO/tao/PortableServer/ThreadStrategyFactoryImpl.h: * TAO/tao/PortableServer/ThreadStrategyORBControl.h: * TAO/tao/PortableServer/ThreadStrategySingle.h: * TAO/tao/PortableServer/ThreadStrategySingleFactoryImpl.h: * TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp:
-rw-r--r--ACE/ace/OS_NS_stropts.cpp1
-rw-r--r--TAO/tao/PortableServer/Active_Policy_Strategies.cpp2
-rw-r--r--TAO/tao/PortableServer/ThreadStrategy.h4
-rw-r--r--TAO/tao/PortableServer/ThreadStrategyFactoryImpl.cpp10
-rw-r--r--TAO/tao/PortableServer/ThreadStrategyFactoryImpl.h4
-rw-r--r--TAO/tao/PortableServer/ThreadStrategyORBControl.h6
-rw-r--r--TAO/tao/PortableServer/ThreadStrategySingle.h6
-rw-r--r--TAO/tao/PortableServer/ThreadStrategySingleFactoryImpl.h4
-rw-r--r--TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp4
9 files changed, 19 insertions, 22 deletions
diff --git a/ACE/ace/OS_NS_stropts.cpp b/ACE/ace/OS_NS_stropts.cpp
index c3bdaee9b9c..a3360172787 100644
--- a/ACE/ace/OS_NS_stropts.cpp
+++ b/ACE/ace/OS_NS_stropts.cpp
@@ -1,6 +1,5 @@
#include "ace/OS_NS_stropts.h"
-
#if !defined (ACE_HAS_INLINED_OSCALLS)
# include "ace/OS_NS_stropts.inl"
#endif /* ACE_HAS_INLINED_OSCALLS */
diff --git a/TAO/tao/PortableServer/Active_Policy_Strategies.cpp b/TAO/tao/PortableServer/Active_Policy_Strategies.cpp
index b8e8a753010..cbb9434cf71 100644
--- a/TAO/tao/PortableServer/Active_Policy_Strategies.cpp
+++ b/TAO/tao/PortableServer/Active_Policy_Strategies.cpp
@@ -123,8 +123,6 @@ namespace TAO
/**/
-// @todo, check if all pointers are != 0
-
if (this->lifespan_strategy_ != 0)
{
this->lifespan_strategy_->strategy_init (poa);
diff --git a/TAO/tao/PortableServer/ThreadStrategy.h b/TAO/tao/PortableServer/ThreadStrategy.h
index 14488287a2b..289c9dcd214 100644
--- a/TAO/tao/PortableServer/ThreadStrategy.h
+++ b/TAO/tao/PortableServer/ThreadStrategy.h
@@ -35,9 +35,9 @@ namespace TAO
virtual int exit () = 0;
- virtual void strategy_init (TAO_Root_POA *poa);
+ void strategy_init (TAO_Root_POA *poa) override;
- virtual void strategy_cleanup();
+ void strategy_cleanup() override;
virtual ::PortableServer::ThreadPolicyValue type() const = 0;
};
diff --git a/TAO/tao/PortableServer/ThreadStrategyFactoryImpl.cpp b/TAO/tao/PortableServer/ThreadStrategyFactoryImpl.cpp
index 03673db270e..908513d3cb4 100644
--- a/TAO/tao/PortableServer/ThreadStrategyFactoryImpl.cpp
+++ b/TAO/tao/PortableServer/ThreadStrategyFactoryImpl.cpp
@@ -22,8 +22,10 @@ namespace TAO
ThreadStrategyFactory *strategy_factory =
ACE_Dynamic_Service<ThreadStrategyFactory>::instance ("ThreadStrategySingleFactory");
- if (strategy_factory != 0)
- strategy = strategy_factory->create (value);
+ if (strategy_factory)
+ {
+ strategy = strategy_factory->create (value);
+ }
else
TAOLIB_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
@@ -37,7 +39,7 @@ namespace TAO
strategy =
ACE_Dynamic_Service<ThreadStrategy>::instance ("ThreadStrategyORBControl");
- if (strategy == 0)
+ if (!strategy)
TAOLIB_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("ERROR, Unable to get ")
@@ -61,7 +63,7 @@ namespace TAO
ThreadStrategyFactory *strategy_factory =
ACE_Dynamic_Service<ThreadStrategyFactory>::instance ("ThreadStrategySingleFactory");
- if (strategy_factory != 0)
+ if (strategy_factory)
{
strategy_factory->destroy (strategy);
}
diff --git a/TAO/tao/PortableServer/ThreadStrategyFactoryImpl.h b/TAO/tao/PortableServer/ThreadStrategyFactoryImpl.h
index a968b63d4ef..666793af2fd 100644
--- a/TAO/tao/PortableServer/ThreadStrategyFactoryImpl.h
+++ b/TAO/tao/PortableServer/ThreadStrategyFactoryImpl.h
@@ -32,9 +32,9 @@ namespace TAO
{
public:
/// Create a new servant retention strategy
- virtual ThreadStrategy* create (::PortableServer::ThreadPolicyValue value);
+ ThreadStrategy* create (::PortableServer::ThreadPolicyValue value) override;
- virtual void destroy (ThreadStrategy *strategy);
+ void destroy (ThreadStrategy *strategy) override;
};
}
}
diff --git a/TAO/tao/PortableServer/ThreadStrategyORBControl.h b/TAO/tao/PortableServer/ThreadStrategyORBControl.h
index 5f267f045d3..1bf7c0cf336 100644
--- a/TAO/tao/PortableServer/ThreadStrategyORBControl.h
+++ b/TAO/tao/PortableServer/ThreadStrategyORBControl.h
@@ -33,11 +33,11 @@ namespace TAO
: public ThreadStrategy
{
public:
- virtual int enter ();
+ int enter () override;
- virtual int exit ();
+ int exit () override;
- virtual ::PortableServer::ThreadPolicyValue type() const;
+ ::PortableServer::ThreadPolicyValue type() const override;
};
}
}
diff --git a/TAO/tao/PortableServer/ThreadStrategySingle.h b/TAO/tao/PortableServer/ThreadStrategySingle.h
index 6d3b9bdbac0..87962311eb7 100644
--- a/TAO/tao/PortableServer/ThreadStrategySingle.h
+++ b/TAO/tao/PortableServer/ThreadStrategySingle.h
@@ -42,11 +42,11 @@ namespace TAO
public ThreadStrategy
{
public:
- virtual int enter ();
+ int enter () override;
- virtual int exit ();
+ int exit () override;
- virtual ::PortableServer::ThreadPolicyValue type() const;
+ ::PortableServer::ThreadPolicyValue type() const override;
private:
TAO_SYNCH_RECURSIVE_MUTEX lock_;
};
diff --git a/TAO/tao/PortableServer/ThreadStrategySingleFactoryImpl.h b/TAO/tao/PortableServer/ThreadStrategySingleFactoryImpl.h
index bd3f0fc4f95..2dbf0a018bc 100644
--- a/TAO/tao/PortableServer/ThreadStrategySingleFactoryImpl.h
+++ b/TAO/tao/PortableServer/ThreadStrategySingleFactoryImpl.h
@@ -34,9 +34,9 @@ namespace TAO
{
public:
/// Create a new thread strategy
- virtual ThreadStrategy* create (::PortableServer::ThreadPolicyValue value);
+ ThreadStrategy* create (::PortableServer::ThreadPolicyValue value) override;
- virtual void destroy (ThreadStrategy *strategy);
+ void destroy (ThreadStrategy *strategy) override;
};
}
}
diff --git a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp b/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
index c9b0dfd8d59..31b271efa0e 100644
--- a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
+++ b/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
@@ -1,4 +1,3 @@
-
//=============================================================================
/**
* @file Single_Threaded_POA.cpp
@@ -12,7 +11,6 @@
*/
//=============================================================================
-
#include "testS.h"
#include "ace/Task.h"
#include "ace/OS_NS_unistd.h"
@@ -76,7 +74,7 @@ class Worker : public ACE_Task_Base
{
public:
Worker (test_ptr t);
- int svc ();
+ int svc () override;
private:
test_var test_;