From 9cd4757c882c2f350f7a39940875f0b144d21207 Mon Sep 17 00:00:00 2001 From: 0xFFFC0000 <0xFFFC0000@proton.me> Date: Tue, 23 Jan 2024 11:18:39 +0330 Subject: [PATCH] Cleanup extra memory allocation, and port boost::shared_ptr to std::shared_ptr. --- contrib/epee/include/misc_language.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/epee/include/misc_language.h b/contrib/epee/include/misc_language.h index ee07bbe8f..4abc2f982 100644 --- a/contrib/epee/include/misc_language.h +++ b/contrib/epee/include/misc_language.h @@ -74,10 +74,10 @@ namespace misc_utils struct call_befor_die_base { - virtual ~call_befor_die_base(){} + virtual ~call_befor_die_base() = default; }; - typedef boost::shared_ptr auto_scope_leave_caller; + typedef std::shared_ptr auto_scope_leave_caller; template @@ -96,7 +96,7 @@ namespace misc_utils template auto_scope_leave_caller create_scope_leave_handler(t_scope_leave_handler f) { - auto_scope_leave_caller slc(new call_befor_die(f)); + auto_scope_leave_caller slc = std::make_shared>(f); return slc; }