diff options
| author | 2022-01-24 11:31:40 -0500 | |
|---|---|---|
| committer | 2022-01-24 11:31:43 -0500 | |
| commit | 51dd3da11ce169fec831fef20efc73d2ba495702 (patch) | |
| tree | aabd97325b9feb30ff544beb8361314ad225d356 /src/input_common/input_engine.h | |
| parent | Merge pull request #7761 from v1993/patch-8 (diff) | |
| download | yuzu-51dd3da11ce169fec831fef20efc73d2ba495702.tar.gz yuzu-51dd3da11ce169fec831fef20efc73d2ba495702.tar.xz yuzu-51dd3da11ce169fec831fef20efc73d2ba495702.zip | |
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 390581c94..5d4fdb4cc 100644 --- a/src/input_common/input_engine.h +++ b/src/input_common/input_engine.h | |||
| @@ -89,7 +89,7 @@ struct UpdateCallback { | |||
| 89 | 89 | ||
| 90 | // Triggered if data changed on the controller and the engine is on configuring mode | 90 | // Triggered if data changed on the controller and the engine is on configuring mode |
| 91 | struct MappingCallback { | 91 | struct MappingCallback { |
| 92 | std::function<void(MappingData)> on_data; | 92 | std::function<void(const MappingData&)> on_data; |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | // Input Identifier of data source | 95 | // Input Identifier of data source |