-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: implement special member functions for Environment #28579
Conversation
b8366b2
to
f7cb4f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your PR contains a lot of stylistic changes. Can you undo those please? We don't accept style changes as a rule and it makes code review a lot more onerous.
The classes in env.h were not adhering to the rule of five. As per the rule of five, if a class implements any of five special member functions, it must implement all the five special member functions for enabling the compiler for better optimization. Refs: https://en.cppreference.com/w/cpp/language/rule_of_three
@bnoordhuis I've made the changes that you requested. PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Landed in 7e69bce |
The classes in env.h were not adhering to the rule of five. As per the rule of five, if a class implements any of five special member functions, it must implement all the five special member functions for enabling the compiler for better optimization. Refs: https://en.cppreference.com/w/cpp/language/rule_of_three PR-URL: nodejs#28579 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
The classes in env.h were not adhering to the rule of five. As per the rule of five, if a class implements any of five special member functions, it must implement all the five special member functions for enabling the compiler for better optimization. Refs: https://en.cppreference.com/w/cpp/language/rule_of_three PR-URL: #28579 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
The Environment class was missing the move constructor
and the move assignmnet operator.
As per the rule of five, a class must implement all the
five special member functions in order to enable the
compiler for better optimization.
Refs: https://en.cppreference.com/w/cpp/language/rule_of_three
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes