From 4e59eadba3b0d4586a9122e6a825ea030a139c9a Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Wed, 20 Mar 2024 13:28:19 -0400 Subject: Use smart pointers with AP classes and Instance --- src/list_item.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/list_item.cpp') diff --git a/src/list_item.cpp b/src/list_item.cpp index d93b81f..16eb9e8 100644 --- a/src/list_item.cpp +++ b/src/list_item.cpp @@ -50,13 +50,12 @@ StatusType StatusListItem::get_status_type() { return status_type; } -APActivity* StatusListItem::get_activity() { +APActivityPtr StatusListItem::get_activity() { return data_archive->get_activity(status_index, {status_type}); } const QString StatusListItem::get_info_html(int text_zone_width, QLocale* locale) { - APActivity* activity = data_archive->get_activity(status_index, {status_type}); + APActivityPtr activity = data_archive->get_activity(status_index, {status_type}); QString html = activity->get_html_render({text_zone_width, locale}); - delete activity; activity = nullptr; return html; } -- cgit v1.2.3-54-g00ecf