diff options
| author | Lioncash <mathew1800@gmail.com> | 2022-01-24 11:31:40 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2022-01-24 11:31:43 -0500 |
| commit | 1bd76dcb7736d2c024266f9c0a1ece76bc4ae912 (patch) | |
| tree | aabd97325b9feb30ff544beb8361314ad225d356 /src/input_common/input_engine.h | |
| parent | 4a497fc961e0e174dc7c9014a0e90493fc0be78b (diff) | |
input_common/main: Pass MappingData by const reference in callbacks
Avoids creating unnecessary 168 byte copies per callback invocation.
Diffstat (limited to 'src/input_common/input_engine.h')
| -rw-r--r-- | src/input_common/input_engine.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h index 390581c948..5d4fdb4cc6 100644 --- a/src/input_common/input_engine.h +++ b/src/input_common/input_engine.h @@ -89,7 +89,7 @@ struct UpdateCallback { // Triggered if data changed on the controller and the engine is on configuring mode struct MappingCallback { - std::function<void(MappingData)> on_data; + std::function<void(const MappingData&)> on_data; }; // Input Identifier of data source |
