Closed rijobro closed 5 years ago
C++11 issue.see for instance http://en.cppreference.com/w/cpp/language/nullptr. Would need to check what the pointer constructor does.
I think removing the NULL
will likely cause petpvc
to crash if the user requests the GTM
or Labbe
method (here). This could of course be handled better with a bool
etc.. I'm reluctant to enforce C++11 at this time.
would need to rely on preprocessor stuff. That's tricky but possibly easier by using CMake and its C++ feature detection stuff (which I don't know).
I wasn't thinking of anything so 'fancy'. More like:
isOutputImageReady = false;
...
outputImage = filter->GetOutput();
isOutputImageReady = true;
...
if ( isOutputImageReady ) {
}
For me compilation was failing due to
PETImageType::Pointer outputImage = NULL;
I rectified this by simply not setting it equal to NULL, i.e.:PETImageType::Pointer outputImage;
No idea if this is safe, but it meant that I could complete compilation and start using the package.