-
-
Notifications
You must be signed in to change notification settings - Fork 665
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STYLE: Default (
= default
) special member functions of Neighborhood
Added in-class default member initializers, in accordance with C++ Core Guidelines, January 3, 2022: "Prefer in-class initializers to member initializers in constructors for constant initializers" https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-in-class-initializer Defaulted its default constructor, copy-constructor, and copy-assignment operator. No longer optimized self-assignment (`neighborhoodX = neighborhoodX`). Note that this commit still supports self-assignment correctly. It just does not have optimized code anymore for this very specific use case. In accordance with C++ Core Guidelines, January 3, 2022: "Make copy assignment safe for self-assignment" https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c62-make-copy-assignment-safe-for-self-assignment
- Loading branch information
Showing
2 changed files
with
6 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters