Explicitly initialize member in copy constructor

For clarity, explicitly default construct the unique_ptr in the copy
constructor
This commit is contained in:
Håkon Hægland
2022-09-19 18:48:33 +02:00
parent cedb92c6d2
commit 769577c8aa
@@ -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) {