mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-11 23:39:29 -05:00
More arguments pass-by-reference.
This commit is contained in:
parent
aae1a953fc
commit
9a33fc884a
@ -29,7 +29,7 @@ struct Metrics {
|
|||||||
const float r;
|
const float r;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Metrics calculate_metrics(const Frame frame) {
|
static Metrics calculate_metrics(const Frame& frame) {
|
||||||
/* TODO: Yikes! M0 doesn't have floating point, so this code is
|
/* TODO: Yikes! M0 doesn't have floating point, so this code is
|
||||||
* expensive! On the other hand, it seems to be working well (and
|
* expensive! On the other hand, it seems to be working well (and
|
||||||
* fast *enough*?), so maybe leave it alone at least for now.
|
* fast *enough*?), so maybe leave it alone at least for now.
|
||||||
@ -66,7 +66,7 @@ static Metrics calculate_metrics(const Frame frame) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::feed(const Frame frame) {
|
void Manager::feed(const Frame& frame) {
|
||||||
// touch_debounce.feed(touch_raw);
|
// touch_debounce.feed(touch_raw);
|
||||||
const auto touch_raw = frame.touch;
|
const auto touch_raw = frame.touch;
|
||||||
//const auto touch_stable = touch_debounce.state();
|
//const auto touch_stable = touch_debounce.state();
|
||||||
|
@ -165,7 +165,7 @@ class Manager {
|
|||||||
public:
|
public:
|
||||||
std::function<void(ui::TouchEvent)> on_event;
|
std::function<void(ui::TouchEvent)> on_event;
|
||||||
|
|
||||||
void feed(const Frame frame);
|
void feed(const Frame& frame);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum State {
|
enum State {
|
||||||
|
Loading…
Reference in New Issue
Block a user