COMP: Remove use of itkDebugMacro in static method#4544
COMP: Remove use of itkDebugMacro in static method#4544thewtex merged 1 commit intoInsightSoftwareConsortium:masterfrom
Conversation
dzenanz
left a comment
There was a problem hiding this comment.
Andras might have a different patch, but to get the nightly dashboard clean, this can be merged quickly.
lassoan
left a comment
There was a problem hiding this comment.
Makes sense, thank you. I haven't had the time to implement something more sophisticated.
|
Sorry to chime in: this note in here looks relevant: But if it is relevant, it is worthwhile pointing that the DCMTK counterpart method is not static: it was recently changed in commit (including renaming it) And thanks for all the effort to get all these fixes lately, and for noticing the dashboard failures this morning. |
|
/azp run ITK.macOS |
| } | ||
| } while (groupNo == 2); | ||
|
|
||
| itkDebugMacro(<< "No DICOM magic number found, but the file appears to be DICOM without a preamble."); |
There was a problem hiding this comment.
Thanks Matt!
- By the way, I did already hesitate to comment about the use of
<<, because we have agreed before that it isn't really necessary for suchitkDebugMacrocalls: Remove initial<<insertion of the formMacro(<< "...)from itk macro calls #4059 commit b52f423
issakomi
left a comment
There was a problem hiding this comment.
The same should be done for DCMTK IO.
/home/r/itk/ITK/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx: In function ‘bool {anonymous}::isNoPreambleDicom(std::ifstream&)’:
/home/r/itk/ITK/Modules/Core/Common/include/itkMacro.h:504:11: error: invalid use of ‘this’ in non-member function
504 | if (this->GetDebug() && ::itk::Object::GetGlobalWarningDisplay()) \
| ^~~~
/home/r/itk/ITK/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx:126:3: note: in expansion of macro ‘itkDebugMacro’
126 | itkDebugMacro(<< "No DICOM magic number found, but the file appears to be DICOM without a preamble.");
| ^~~~~~~~~~~~~
/home/r/itk/ITK/Modules/Core/Common/include/itkMacro.h:508:19: error: invalid use of ‘this’ in non-member function
508 | << this->GetNameOfClass() << " (" << this << "): " x << "\n\n"; \
| ^~~~
/home/r/itk/ITK/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx:126:3: note: in expansion of macro ‘itkDebugMacro’
126 | itkDebugMacro(<< "No DICOM magic number found, but the file appears to be DICOM without a preamble.");
| ^~~~~~~~~~~~~
/home/r/itk/ITK/Modules/Core/Common/include/itkMacro.h:508:53: error: invalid use of ‘this’ in non-member function
508 | << this->GetNameOfClass() << " (" << this << "): " x << "\n\n"; \
| ^~~~
/home/r/itk/ITK/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx:126:3: note: in expansion of macro ‘itkDebugMacro’
126 | itkDebugMacro(<< "No DICOM magic number found, but the file appears to be DICOM without a preamble.");
| ^~~~~~~~~~~~~
make[2]: *** [Modules/IO/DCMTK/src/CMakeFiles/ITKIODCMTK.dir/build.make:76: Modules/IO/DCMTK/src/CMakeFiles/ITKIODCMTK.dir/itkDCMTKImageIO.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:9911: Modules/IO/DCMTK/src/CMakeFiles/ITKIODCMTK.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
To address:
```
/Users/builder/externalModules/IO/GDCM/src/itkGDCMImageIO.cxx:191:3: error: invalid use of 'this' outside of a non-static member function
itkDebugMacro(<< "No DICOM magic number found, but the file appears to be DICOM without a preamble.");
^
[CTest: warning matched] /Users/builder/externalModules/Core/Common/include/itkMacro.h:504:11: note: expanded from macro 'itkDebugMacro'
if (this->GetDebug() && ::itk::Object::GetGlobalWarningDisplay()) \
^
/Users/builder/externalModules/IO/GDCM/src/itkGDCMImageIO.cxx:191:3: error: invalid use of 'this' outside of a non-static member function
[CTest: warning matched] /Users/builder/externalModules/Core/Common/include/itkMacro.h:508:19: note: expanded from macro 'itkDebugMacro'
<< this->GetNameOfClass() << " (" << this << "): " x << "\n\n"; \
^
/Users/builder/externalModules/IO/GDCM/src/itkGDCMImageIO.cxx:191:3: error: invalid use of 'this' outside of a non-static member function
[CTest: warning matched] /Users/builder/externalModules/Core/Common/include/itkMacro.h:508:53: note: expanded from macro 'itkDebugMacro'
<< this->GetNameOfClass() << " (" << this << "): " x << "\n\n"; \
^
3 errors generated.
```
Re: https://open.cdash.org/viewBuildError.php?buildid=9495220
9b967f6 to
843dba1
Compare
|
Thanks, all for the reviews. 👁️ Also removed from DCMTKImageIO. |
…his-get-debug-static COMP: Remove use of itkDebugMacro in static method
To address:
Re: https://open.cdash.org/viewBuildError.php?buildid=9495220