From 51dd3da11ce169fec831fef20efc73d2ba495702 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 24 Jan 2022 11:31:40 -0500 Subject: input_common/main: Pass MappingData by const reference in callbacks Avoids creating unnecessary 168 byte copies per callback invocation. --- src/input_common/input_engine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input_common/input_engine.h') 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 { // Triggered if data changed on the controller and the engine is on configuring mode struct MappingCallback { - std::function on_data; + std::function on_data; }; // Input Identifier of data source -- cgit v1.2.3 From 651358d0b66dc425366059a7c119a2aec3fada1e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 24 Jan 2022 11:57:45 -0500 Subject: input_common/input_engine: Ensure PadIdentifier UUIDs have a valid initial state The default constructor of a UUID instance doesn't initialize the underlying array. --- src/input_common/input_engine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input_common/input_engine.h') diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h index 5d4fdb4cc..fe2faee5a 100644 --- a/src/input_common/input_engine.h +++ b/src/input_common/input_engine.h @@ -16,7 +16,7 @@ // Pad Identifier of data source struct PadIdentifier { - Common::UUID guid{}; + Common::UUID guid{Common::INVALID_UUID}; std::size_t port{}; std::size_t pad{}; -- cgit v1.2.3