Skip to content

Commit 10873ec

Browse files
committed
BUG: Common naming of \#define conflicts with ITK
When VTK and ITK are used together, the \#define ThreadInfoStruct vtkMultiThreader::ThreadInfo from VTK/Common/Core/vtkMultiThreader.h would clobber the ThreadInfoStruct definition from ITK/Modules/Core/Common/include/itkMultiThreaderBase.h: 104 struct ThreadInfoStruct 105 { 106 ThreadIdType ThreadID; 107 ThreadIdType NumberOfThreads; 108 void* UserData; 109 ThreadFunctionType ThreadFunction; 110 enum { SUCCESS, ITK_EXCEPTION, ITK_PROCESS_ABORTED_EXCEPTION, STD_EXCEPTION, UNKNOWN } ThreadExitCode; 111 }; ===== using ThreadInfoStruct=vtkMultiThreader::ThreadInfo; avoids the pre-processor conflicts. ===== See https://discourse.itk.org/t/vtk9-and-itk5-conflicts/802 for discussion.
1 parent 11e3c14 commit 10873ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Common/Core/vtkMultiThreader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ class VTKCOMMONCORE_EXPORT vtkMultiThreader : public vtkObject
9494
* The UserData is the (void *)arg passed into the SetSingleMethod,
9595
* SetMultipleMethod, or SpawnThread method.
9696
*/
97-
98-
#define ThreadInfoStruct vtkMultiThreader::ThreadInfo
9997
class ThreadInfo
10098
{
10199
public:
@@ -228,5 +226,7 @@ class VTKCOMMONCORE_EXPORT vtkMultiThreader : public vtkObject
228226
void operator=(const vtkMultiThreader&) = delete;
229227
};
230228

229+
using ThreadInfoStruct=vtkMultiThreader::ThreadInfo;
230+
231231
#endif
232232

0 commit comments

Comments
 (0)