From 720c3026ecde1b1b585fa733080dfa4759cee6c1 Mon Sep 17 00:00:00 2001 From: Minh Vuong Date: Thu, 26 Mar 2026 08:21:21 +0800 Subject: [PATCH] Fixed a problem where AlwaysAssert macro does not like std::unique_ptr as an expression --- synthesis/Images/ADIOSImage.tcc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synthesis/Images/ADIOSImage.tcc b/synthesis/Images/ADIOSImage.tcc index e6b11ae..85be8c9 100644 --- a/synthesis/Images/ADIOSImage.tcc +++ b/synthesis/Images/ADIOSImage.tcc @@ -285,7 +285,8 @@ void ADIOSImage::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 restoredCoords(casacore::CoordinateSystem::restore(rec, "coords")); - AlwaysAssert(restoredCoords, casacore::AipsError); + const bool notNull = static_cast(restoredCoords); + AlwaysAssert(notNull, casacore::AipsError); this->setCoordsMember(*restoredCoords); // Restore the image info. restoreImageInfo (rec);