From 6f6ab57eb79fc88f02837c3869108bcae17b9d04 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 10 Feb 2026 14:32:07 +0100 Subject: [PATCH] [client,sdl] use std::make_shared --- client/SDL/SDL3/dialogs/sdl_buttons.cpp | 2 +- client/SDL/SDL3/dialogs/sdl_input_widget_pair_list.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/SDL/SDL3/dialogs/sdl_buttons.cpp b/client/SDL/SDL3/dialogs/sdl_buttons.cpp index f7d54fd37..d22203986 100644 --- a/client/SDL/SDL3/dialogs/sdl_buttons.cpp +++ b/client/SDL/SDL3/dialogs/sdl_buttons.cpp @@ -25,7 +25,7 @@ bool SdlButtonList::populate(std::shared_ptr& renderer, const size_t curOffsetX = offsetX + x * (static_cast(width) + hpadding); const SDL_FRect rect = { static_cast(curOffsetX), static_cast(offsetY), static_cast(width), static_cast(height) }; - std::shared_ptr button(new SdlButton(renderer, labels[x], ids[x], rect)); + auto button = std::make_shared(renderer, labels[x], ids[x], rect); _list.emplace_back(button); } return true; diff --git a/client/SDL/SDL3/dialogs/sdl_input_widget_pair_list.cpp b/client/SDL/SDL3/dialogs/sdl_input_widget_pair_list.cpp index e07ea9657..dcb091a42 100644 --- a/client/SDL/SDL3/dialogs/sdl_input_widget_pair_list.cpp +++ b/client/SDL/SDL3/dialogs/sdl_input_widget_pair_list.cpp @@ -50,8 +50,8 @@ SdlInputWidgetPairList::SdlInputWidgetPairList(const std::string& title, { for (size_t x = 0; x < labels.size(); x++) { - std::shared_ptr widget(new SdlInputWidgetPair( - _renderer, labels[x], initial[x], flags[x], x, widget_width, widget_heigth)); + auto widget = std::make_shared( + _renderer, labels[x], initial[x], flags[x], x, widget_width, widget_heigth); m_list.emplace_back(widget); }