Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Refactor const ref args in Node classes ctors and setters. #163

Merged

Conversation

ienkovich
Copy link
Contributor

During work on Node classes, I replaced many constant reference arguments with by-value arguments. This is because constructors and setters are going to store them in the object anyway, so using by-value arguments allows a caller to avoid a copy if he decides to move-create or emplace-create arguments (he has no such option with constant reference arguments).

Some constant reference cases were missed and move-construction is not always used. This minor refactoring fixes that.

@ienkovich ienkovich force-pushed the ienkovich/remove-const-ref-vector-args-in-node-ctors branch from e262656 to 2a644aa Compare January 17, 2023 23:29
Copy link
Contributor

@kurapov-peter kurapov-peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ienkovich ienkovich merged commit bfa83ae into main Jan 19, 2023
@ienkovich ienkovich deleted the ienkovich/remove-const-ref-vector-args-in-node-ctors branch January 19, 2023 18:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants