mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
Explicitly initialize member in copy constructor
For clarity, explicitly default construct the unique_ptr in the copy constructor
This commit is contained in:
@@ -167,7 +167,9 @@ class BlackOilIntensiveQuantities
|
||||
if (other) { // other does not contain a nullptr
|
||||
ptr_ = std::make_unique<T>(*other.get());
|
||||
}
|
||||
// else {ptr_ = nullptr;} // this is the default construction value
|
||||
else {
|
||||
ptr_ = nullptr;
|
||||
}
|
||||
}
|
||||
// assignment operator
|
||||
CopyablePtr<T>& operator=(const CopyablePtr<T>& other) {
|
||||
|
||||
Reference in New Issue
Block a user