Skip to content

Commit

Permalink
perf: Use move
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Jan 20, 2025
1 parent c28da0b commit 292945f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/nitrogen/src/views/CppHybridViewComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<HybridTestViewProps>& getProps() const { return _props; }

public:
Expand Down

0 comments on commit 292945f

Please sign in to comment.