From: Timo Heister Date: Sat, 4 Jan 2020 01:48:01 +0000 (-0500) Subject: deprecate members in TimerOutput X-Git-Tag: v9.2.0-rc1~742^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9219%2Fhead;p=dealii.git deprecate members in TimerOutput It looks like these identical functions have been around for a long time. While I prefer enter/exit_section(), we use the others in most places. --- diff --git a/include/deal.II/base/timer.h b/include/deal.II/base/timer.h index 1acb5750d2..fdc03bb4f8 100644 --- a/include/deal.II/base/timer.h +++ b/include/deal.II/base/timer.h @@ -790,13 +790,12 @@ public: /** * Same as @p enter_subsection. + * + * @deprecated Use enter_subsection() instead. */ - void + DEAL_II_DEPRECATED void enter_section(const std::string §ion_name); - // TODO: make some of these functions DEPRECATED (I would keep - // enter/exit_section) - /** * Leave a section. If no name is given, the last section that was entered * is left. @@ -806,8 +805,10 @@ public: /** * Same as @p leave_subsection. + * + * @deprecated Use leave_subsection() instead. */ - void + DEAL_II_DEPRECATED void exit_section(const std::string §ion_name = ""); /** diff --git a/tests/base/timer_03.cc b/tests/base/timer_03.cc index aa61cea648..401a9a27c3 100644 --- a/tests/base/timer_03.cc +++ b/tests/base/timer_03.cc @@ -77,14 +77,14 @@ main() Timer t1, t2; TimerOutput tO(std::cout, TimerOutput::summary, TimerOutput::cpu_times); - tO.enter_section("Section1"); - tO.enter_section("Section2"); + tO.enter_subsection("Section1"); + tO.enter_subsection("Section2"); burn(50); - tO.exit_section("Section2"); - tO.enter_section("Section2"); + tO.leave_subsection("Section2"); + tO.enter_subsection("Section2"); burn(50); - tO.exit_section("Section2"); - tO.exit_section("Section1"); + tO.leave_subsection("Section2"); + tO.leave_subsection("Section1"); std::map cpu_times = tO.get_summary_data(TimerOutput::OutputData::total_cpu_time); diff --git a/tests/base/timer_07.cc b/tests/base/timer_07.cc index bb4eb351c6..4523a4be00 100644 --- a/tests/base/timer_07.cc +++ b/tests/base/timer_07.cc @@ -39,7 +39,7 @@ main(int argc, char **argv) std::cerr, TimerOutput::summary, TimerOutput::cpu_times); - timer_out.enter_section("Section1"); + timer_out.enter_subsection("Section1"); throw Timer07Exception(); }