mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-21 05:14:26 -04:00
Don't use raw new/delete (#1398)
* Use unique_ptr in ui_btngrid * Use unique_ptr for ui_menu * Use unique_ptr for rssi_dma * Use unique_ptr for painter
This commit is contained in:
parent
95a48e5693
commit
a476647d70
7 changed files with 61 additions and 71 deletions
|
@ -31,8 +31,10 @@
|
|||
#include "signal.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace ui {
|
||||
|
||||
|
@ -62,7 +64,7 @@ class BtnGridView : public View {
|
|||
uint32_t highlighted_index();
|
||||
|
||||
void set_parent_rect(const Rect new_parent_rect) override;
|
||||
void set_arrow_enabled(bool new_value);
|
||||
void set_arrow_enabled(bool enabled);
|
||||
void on_focus() override;
|
||||
void on_blur() override;
|
||||
bool on_key(const KeyEvent event) override;
|
||||
|
@ -77,7 +79,7 @@ class BtnGridView : public View {
|
|||
|
||||
SignalToken signal_token_tick_second{};
|
||||
std::vector<GridItem> menu_items{};
|
||||
std::vector<NewButton*> menu_item_views{};
|
||||
std::vector<std::unique_ptr<NewButton>> menu_item_views{};
|
||||
|
||||
Image arrow_more{
|
||||
{228, 320 - 8, 8, 8},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue