From 6ed34759dd23452b33dfed48979be272a1c274dd Mon Sep 17 00:00:00 2001 From: Son Dinh Date: Tue, 19 Nov 2024 16:09:24 -0600 Subject: [PATCH 1/3] Duplicate reactor timer functions --- ACE/ace/Reactor.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/ACE/ace/Reactor.h b/ACE/ace/Reactor.h index cf8b2bc291b9d..f037d9b932485 100644 --- a/ACE/ace/Reactor.h +++ b/ACE/ace/Reactor.h @@ -571,18 +571,6 @@ class ACE_Export ACE_Reactor : public ACE_Reactor_Timer_Interface const ACE_Time_Value &interval = ACE_Time_Value::zero); - template> - long schedule_timer (ACE_Event_Handler *event_handler, - const void *arg, - const std::chrono::duration& delay, - const std::chrono::duration& interval = - std::chrono::duration::zero ()) - { - ACE_Time_Value const tv_delay (delay); - ACE_Time_Value const tv_interval (interval); - return this->schedule_timer (event_handler, arg, tv_delay, tv_interval); - } - /** * Reset recurring timer interval. * @@ -597,14 +585,6 @@ class ACE_Export ACE_Reactor : public ACE_Reactor_Timer_Interface virtual int reset_timer_interval (long timer_id, const ACE_Time_Value &interval); - template - int reset_timer_interval (long timer_id, - const std::chrono::duration& interval) - { - ACE_Time_Value const tv_interval (interval); - return this->reset_timer_interval (timer_id, tv_interval); - } - /** * Cancel timer. * From bb2a27e0e7c696598f7c1f6d5774ad46cf8db2cc Mon Sep 17 00:00:00 2001 From: Son Dinh Date: Thu, 21 Nov 2024 10:11:14 -0600 Subject: [PATCH 2/3] Call base member template --- ACE/ace/Reactor.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ACE/ace/Reactor.h b/ACE/ace/Reactor.h index f037d9b932485..7d4f6cdf6593b 100644 --- a/ACE/ace/Reactor.h +++ b/ACE/ace/Reactor.h @@ -571,6 +571,15 @@ class ACE_Export ACE_Reactor : public ACE_Reactor_Timer_Interface const ACE_Time_Value &interval = ACE_Time_Value::zero); + template> + long schedule_timer (ACE_Event_Handler *event_handler, + const void *arg, + const std::chrono::duration& delay, + const std::chrono::duration& interval = std::chrono::duration::zero ()) + { + return ACE_Reactor_Timer_Interface::schedule_timer(event_handler, arg, delay, interval); + } + /** * Reset recurring timer interval. * @@ -585,6 +594,13 @@ class ACE_Export ACE_Reactor : public ACE_Reactor_Timer_Interface virtual int reset_timer_interval (long timer_id, const ACE_Time_Value &interval); + template + int reset_timer_interval (long timer_id, + const std::chrono::duration& interval) + { + return ACE_Reactor_Timer_Interface::reset_timer_interval(timer_id, interval); + } + /** * Cancel timer. * From ef42200cbe3802b54c58af4b6820560598b3c61a Mon Sep 17 00:00:00 2001 From: Son Dinh Date: Thu, 21 Nov 2024 14:45:02 -0600 Subject: [PATCH 3/3] Try using to bring the base class's functions into scope --- ACE/ace/Reactor.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/ACE/ace/Reactor.h b/ACE/ace/Reactor.h index 7d4f6cdf6593b..ef61f2e680c55 100644 --- a/ACE/ace/Reactor.h +++ b/ACE/ace/Reactor.h @@ -571,14 +571,7 @@ class ACE_Export ACE_Reactor : public ACE_Reactor_Timer_Interface const ACE_Time_Value &interval = ACE_Time_Value::zero); - template> - long schedule_timer (ACE_Event_Handler *event_handler, - const void *arg, - const std::chrono::duration& delay, - const std::chrono::duration& interval = std::chrono::duration::zero ()) - { - return ACE_Reactor_Timer_Interface::schedule_timer(event_handler, arg, delay, interval); - } + using ACE_Reactor_Timer_Interface::schedule_timer; /** * Reset recurring timer interval. @@ -594,12 +587,7 @@ class ACE_Export ACE_Reactor : public ACE_Reactor_Timer_Interface virtual int reset_timer_interval (long timer_id, const ACE_Time_Value &interval); - template - int reset_timer_interval (long timer_id, - const std::chrono::duration& interval) - { - return ACE_Reactor_Timer_Interface::reset_timer_interval(timer_id, interval); - } + using ACE_Reactor_Timer_Interface::reset_timer_interval; /** * Cancel timer.