Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion synthesis/Images/ADIOSImage.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ void ADIOSImage<T>::restoreAll (const casacore::TableRecord& rec)
// MV: I am not sure whether we're supposed to take the ownership of the returned raw pointer, but the original code
// written with raw pointers did the equivalent thing
std::unique_ptr<casacore::CoordinateSystem> restoredCoords(casacore::CoordinateSystem::restore(rec, "coords"));
AlwaysAssert(restoredCoords, casacore::AipsError);
const bool notNull = static_cast<bool>(restoredCoords);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

although personally I'd prefer a one-liner AlwaysAssert(static_cast(restoredCoords)); if you have it with the assignment step, you technically don't need the static_cast (it will cast automatically - this didn't work in the original code because the macro uses the type for the template type resolution)

AlwaysAssert(notNull, casacore::AipsError);
this->setCoordsMember(*restoredCoords);
// Restore the image info.
restoreImageInfo (rec);
Expand Down
Loading