mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 09:07:44 +00: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:
@@ -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};
|
||||
|
Reference in New Issue
Block a user