More arguments pass-by-reference.

This commit is contained in:
Jared Boone 2016-02-06 16:44:19 -08:00
parent aae1a953fc
commit 9a33fc884a
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ struct Metrics {
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
* expensive! On the other hand, it seems to be working well (and
* 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);
const auto touch_raw = frame.touch;
//const auto touch_stable = touch_debounce.state();

View File

@ -165,7 +165,7 @@ class Manager {
public:
std::function<void(ui::TouchEvent)> on_event;
void feed(const Frame frame);
void feed(const Frame& frame);
private:
enum State {