diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-03-09 18:44:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-09 18:44:09 +0100 |
commit | b0a0b92a0ee6bb248700d6ff4e7c51cc44db198f (patch) | |
tree | f78fc5b7b2ea337ffc306a77223018fcc780e507 /ACE/tests | |
parent | 199259c5d2d5f4a6550382a683f5d54ac482fcd1 (diff) | |
parent | adc1dcda981a4c76612bedeba2dddb76aa272d6f (diff) | |
download | ATCD-b0a0b92a0ee6bb248700d6ff4e7c51cc44db198f.tar.gz |
Merge pull request #1446 from jwillemsen/jwi-cpp11cleanup
Various cleanup and use of C++11 features
Diffstat (limited to 'ACE/tests')
-rw-r--r-- | ACE/tests/Bound_Ptr_Test.h | 2 | ||||
-rw-r--r-- | ACE/tests/MEM_Stream_Test.h | 2 | ||||
-rw-r--r-- | ACE/tests/MT_Reactor_Timer_Test.h | 2 | ||||
-rw-r--r-- | ACE/tests/New_Fail_Test.cpp | 13 | ||||
-rw-r--r-- | ACE/tests/Notify_Performance_Test.cpp | 4 | ||||
-rw-r--r-- | ACE/tests/Priority_Reactor_Test.h | 2 | ||||
-rw-r--r-- | ACE/tests/Process_Strategy_Test.h | 2 | ||||
-rw-r--r-- | ACE/tests/SSL/Bug_2912_Regression_Test.cpp | 4 | ||||
-rw-r--r-- | ACE/tests/Service_Config_DLL.h | 6 | ||||
-rw-r--r-- | ACE/tests/Service_Config_Stream_DLL.h | 2 | ||||
-rw-r--r-- | ACE/tests/Upgradable_RW_Test.h | 4 |
11 files changed, 19 insertions, 24 deletions
diff --git a/ACE/tests/Bound_Ptr_Test.h b/ACE/tests/Bound_Ptr_Test.h index b6bc6691c0e..326fc2e8ae0 100644 --- a/ACE/tests/Bound_Ptr_Test.h +++ b/ACE/tests/Bound_Ptr_Test.h @@ -67,7 +67,7 @@ public: protected: /// Runs the Scheduler's event loop, which dequeues <Method_Requests> /// and dispatches them. - virtual int svc (void); + virtual int svc (); private: // = These are the <Scheduler> implementation details. diff --git a/ACE/tests/MEM_Stream_Test.h b/ACE/tests/MEM_Stream_Test.h index f81207b805b..cbba67d5562 100644 --- a/ACE/tests/MEM_Stream_Test.h +++ b/ACE/tests/MEM_Stream_Test.h @@ -42,7 +42,7 @@ public: virtual int handle_input (ACE_HANDLE h); virtual int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask); - virtual int svc (void); + virtual int svc (); private: ACE_TCHAR name_[MAXPATHLEN]; diff --git a/ACE/tests/MT_Reactor_Timer_Test.h b/ACE/tests/MT_Reactor_Timer_Test.h index 4c0a9e68f35..966a48e1500 100644 --- a/ACE/tests/MT_Reactor_Timer_Test.h +++ b/ACE/tests/MT_Reactor_Timer_Test.h @@ -40,7 +40,7 @@ public: int verify_results(void); /// Run by a daemon thread to handle deferred processing. - virtual int svc (void); + virtual int svc (); virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg); diff --git a/ACE/tests/New_Fail_Test.cpp b/ACE/tests/New_Fail_Test.cpp index 5e1a5921802..10957e455fe 100644 --- a/ACE/tests/New_Fail_Test.cpp +++ b/ACE/tests/New_Fail_Test.cpp @@ -20,7 +20,6 @@ #include "ace/Log_Msg.h" #include "ace/OS_Memory.h" #include "ace/CORBA_macros.h" - #include "ace/Numeric_Limits.h" // This test allocates all of the heap memory, forcing 'new' to fail @@ -37,7 +36,7 @@ static const size_t BIG_BLOCK = ACE_Numeric_Limits<size_t>::max () / 2; // Shouldn't take many "as much as possible" tries to get a failure. -static const int MAX_ALLOCS_IN_TEST = 4; +static const int MAX_ALLOCS_IN_TEST = 2; static void try_ace_new (char **p) @@ -49,15 +48,15 @@ try_ace_new (char **p) static char * try_ace_new_return () { - char *p = 0; - ACE_NEW_RETURN (p, char[BIG_BLOCK], 0); + char *p {}; + ACE_NEW_RETURN (p, char[BIG_BLOCK], nullptr); return p; } static char * try_ace_new_noreturn () { - char *p = 0; + char *p {}; ACE_NEW_NORETURN (p, char[BIG_BLOCK]); return p; } @@ -66,10 +65,10 @@ int run_main (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("New_Fail_Test")); - int status = 0; + int status {}; char *blocks[MAX_ALLOCS_IN_TEST]; - int i; + int i {}; try { diff --git a/ACE/tests/Notify_Performance_Test.cpp b/ACE/tests/Notify_Performance_Test.cpp index 84f61e6ff43..5bfb4207632 100644 --- a/ACE/tests/Notify_Performance_Test.cpp +++ b/ACE/tests/Notify_Performance_Test.cpp @@ -1,4 +1,3 @@ - //============================================================================= /** * @file Notify_Performance_Test.cpp @@ -12,7 +11,6 @@ */ //============================================================================= - #include <utility> #include "test_config.h" @@ -26,8 +24,6 @@ #include "ace/Auto_Ptr.h" #include "ace/Atomic_Op.h" - - #if defined (ACE_HAS_THREADS) // Number of client (user) threads diff --git a/ACE/tests/Priority_Reactor_Test.h b/ACE/tests/Priority_Reactor_Test.h index 9d6caaace43..10a7ba3cd01 100644 --- a/ACE/tests/Priority_Reactor_Test.h +++ b/ACE/tests/Priority_Reactor_Test.h @@ -68,7 +68,7 @@ class Write_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_SYNCH> { public: virtual int open (void *); - virtual int svc (void); + virtual int svc (); }; #endif /* ACE_TESTS_PRIORITY_REACTOR_TEST_H */ diff --git a/ACE/tests/Process_Strategy_Test.h b/ACE/tests/Process_Strategy_Test.h index 345480596dd..190b1d392ea 100644 --- a/ACE/tests/Process_Strategy_Test.h +++ b/ACE/tests/Process_Strategy_Test.h @@ -50,7 +50,7 @@ protected: // = Methods invoked via "pointer to method" table entry. /// Handle the THREAD case. - virtual int svc (void); + virtual int svc (); // = Operations corresponding to requests from the client. /// Execute the read operation on the file. diff --git a/ACE/tests/SSL/Bug_2912_Regression_Test.cpp b/ACE/tests/SSL/Bug_2912_Regression_Test.cpp index 653b9ade93d..819413a431e 100644 --- a/ACE/tests/SSL/Bug_2912_Regression_Test.cpp +++ b/ACE/tests/SSL/Bug_2912_Regression_Test.cpp @@ -96,7 +96,7 @@ typedef ACE_Singleton<Client_Proactor, ACE_SYNCH_RECURSIVE_MUTEX> class Client_Proactor_Task : public ACE_Task_Base { public: - virtual int svc (void); + virtual int svc (); }; typedef ACE_Singleton<Client_Proactor_Task, ACE_SYNCH_RECURSIVE_MUTEX> @@ -125,7 +125,7 @@ typedef ACE_Singleton<Server_Proactor, ACE_SYNCH_RECURSIVE_MUTEX> class Server_Proactor_Task : public ACE_Task_Base { public: - virtual int svc (void); + virtual int svc (); }; typedef ACE_Singleton<Server_Proactor_Task, ACE_SYNCH_RECURSIVE_MUTEX> diff --git a/ACE/tests/Service_Config_DLL.h b/ACE/tests/Service_Config_DLL.h index 27f966efe8c..ca66ec748db 100644 --- a/ACE/tests/Service_Config_DLL.h +++ b/ACE/tests/Service_Config_DLL.h @@ -42,14 +42,14 @@ public: virtual int init (int argc, ACE_TCHAR *argv[]); /// Terminates object when dynamic unlinking occurs. - virtual int fini (void); + virtual int fini (); /// Run by a daemon thread. /** * Each thread will invoke the Service Configurator via this * method unless the object is the "FINAL" object. */ - virtual int svc (void); + virtual int svc (); private: @@ -75,7 +75,7 @@ public: virtual int init (int argc, ACE_TCHAR *argv[]); /// Terminates object when dynamic unlinking occurs. - virtual int fini (void); + virtual int fini (); /// Returns information on a service object. virtual int info (ACE_TCHAR **info_string, size_t length = 0) const; diff --git a/ACE/tests/Service_Config_Stream_DLL.h b/ACE/tests/Service_Config_Stream_DLL.h index f54fc6da5cc..716c5fd147c 100644 --- a/ACE/tests/Service_Config_Stream_DLL.h +++ b/ACE/tests/Service_Config_Stream_DLL.h @@ -26,7 +26,7 @@ public: //FUZZ: enable check_for_lack_ACE_OS virtual int init (int, ACE_TCHAR *[]); - virtual int fini (void); + virtual int fini (); }; // Task to verify the order and operation of the stream assembly diff --git a/ACE/tests/Upgradable_RW_Test.h b/ACE/tests/Upgradable_RW_Test.h index 4382c1f9bb5..24ae64d5e30 100644 --- a/ACE/tests/Upgradable_RW_Test.h +++ b/ACE/tests/Upgradable_RW_Test.h @@ -113,7 +113,7 @@ public: { }; - virtual int svc (void); + virtual int svc (); private: /// keep a reference to the time calculation class @@ -139,7 +139,7 @@ public: { }; - virtual int svc (void); + virtual int svc (); private: /// keep a reference to the time calculation class |