mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-24 14:50:43 -04:00
Frequman widget gets a non owning reference to the database instead of copying (#1175)
-Get rid of -Weffc++ pointer member warnings by restricting copy of FreqManUIList -Add null checks -Remove unused macro
This commit is contained in:
parent
909f37f89b
commit
e1c519d71e
3 changed files with 17 additions and 15 deletions
|
@ -49,6 +49,8 @@ class FreqManUIList : public Widget {
|
|||
FreqManUIList()
|
||||
: FreqManUIList{{}, {}} {
|
||||
}
|
||||
FreqManUIList(const FreqManUIList& other) = delete;
|
||||
FreqManUIList& operator=(const FreqManUIList& other) = delete;
|
||||
|
||||
void paint(Painter& painter) override;
|
||||
void on_focus() override;
|
||||
|
@ -64,7 +66,7 @@ class FreqManUIList : public Widget {
|
|||
private:
|
||||
static constexpr int8_t char_height = 16;
|
||||
bool instant_exec_{false};
|
||||
freqman_db freqlist_db{};
|
||||
freqman_db* freqlist_db{nullptr};
|
||||
int current_index{0};
|
||||
int highlighted_index{0};
|
||||
int freqlist_nb_lines{0};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue