From b947e4a4ae0e06633b114dd59d447973fc5aaa56 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 20 Oct 2017 18:06:24 +0200 Subject: options/scoped: use raii --- logic/runtime-libraries.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'logic/runtime-libraries.cpp') diff --git a/logic/runtime-libraries.cpp b/logic/runtime-libraries.cpp index eb5f02cc..a04da6a2 100644 --- a/logic/runtime-libraries.cpp +++ b/logic/runtime-libraries.cpp @@ -10,9 +10,7 @@ runtime_libraries::runtime_libraries(QFrame* frame, dylibptr t, dylibptr p, dyli { using namespace options; - const bool prev_teardown_flag = opts::is_tracker_teardown(); - - opts::set_teardown_flag(true); + with_tracker_teardown sentinel; pProtocol = make_dylib_instance(p); @@ -42,6 +40,6 @@ runtime_libraries::runtime_libraries(QFrame* frame, dylibptr t, dylibptr p, dyli correct = true; end: - opts::set_teardown_flag(prev_teardown_flag); + (void)0; } -- cgit v1.2.3