From 292945f80433df667f7560806ba18ee9075401e9 Mon Sep 17 00:00:00 2001 From: mrousavy Date: Mon, 20 Jan 2025 16:51:32 +0100 Subject: [PATCH] perf: Use move --- packages/nitrogen/src/views/CppHybridViewComponent.ts | 2 +- .../generated/shared/c++/views/HybridTestViewComponent.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nitrogen/src/views/CppHybridViewComponent.ts b/packages/nitrogen/src/views/CppHybridViewComponent.ts index d2095b64..6de0a0cf 100644 --- a/packages/nitrogen/src/views/CppHybridViewComponent.ts +++ b/packages/nitrogen/src/views/CppHybridViewComponent.ts @@ -118,7 +118,7 @@ namespace ${namespace} { ${stateClassName}() = default; public: - void setProps(${propsClassName}&& props) { _props.emplace(props); } + void setProps(${propsClassName}&& props) { _props.emplace(std::move(props)); } const std::optional<${propsClassName}>& getProps() const { return _props; } public: diff --git a/packages/react-native-nitro-image/nitrogen/generated/shared/c++/views/HybridTestViewComponent.hpp b/packages/react-native-nitro-image/nitrogen/generated/shared/c++/views/HybridTestViewComponent.hpp index e1cb5094..3675723b 100644 --- a/packages/react-native-nitro-image/nitrogen/generated/shared/c++/views/HybridTestViewComponent.hpp +++ b/packages/react-native-nitro-image/nitrogen/generated/shared/c++/views/HybridTestViewComponent.hpp @@ -56,7 +56,7 @@ namespace margelo::nitro::image::views { HybridTestViewState() = default; public: - void setProps(HybridTestViewProps&& props) { _props.emplace(props); } + void setProps(HybridTestViewProps&& props) { _props.emplace(std::move(props)); } const std::optional& getProps() const { return _props; } public: