Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Fix vtkTractographyPoint implicit declaration warning #219

Conversation

jhlegarreta
Copy link
Contributor

Fix vtkTractographyPoint implicit declaration warning: declare the copy constructor.

Fixes:

[57/263] Building CXX object Libs/vtkDMRI/CMakeFiles/vtkDMRIPython.dir/vtkTractographyPointAndArrayPython.cxx.o
SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:
 In function ‘PyObject* PyvtkTractographyPoint_vtkTractographyPoint_s2(PyObject*, PyObject*)’:
SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:53:63:
 warning: implicitly-declared ‘constexpr vtkTractographyPoint::vtkTractographyPoint(const vtkTractographyPoint&)’ is deprecated [-Wdeprecated-copy]
   53 |     vtkTractographyPoint *op = new vtkTractographyPoint(*temp0);
      |                                                               ^
In file included from SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:10:
SlicerDMRI/SlicerDMRI/Libs/vtkDMRI/vtkTractographyPointAndArray.h:30:27:
 note: because ‘vtkTractographyPoint’ has user-provided ‘vtkTractographyPoint& vtkTractographyPoint::operator=(const vtkTractographyPoint&)’
   30 |     vtkTractographyPoint &operator=(const vtkTractographyPoint& hp); //for resizing
      |                           ^~~~~~~~
SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:
 In function ‘void* PyvtkTractographyPoint_CCopy(const void*)’:
SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:180:83:
 warning: implicitly-declared ‘constexpr vtkTractographyPoint::vtkTractographyPoint(const vtkTractographyPoint&)’ is deprecated [-Wdeprecated-copy]
  180 |     return new vtkTractographyPoint(*static_cast<const vtkTractographyPoint*>(obj));
      |                                                                                   ^
In file included from SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:10:
SlicerDMRI/SlicerDMRI/Libs/vtkDMRI/vtkTractographyPointAndArray.h:30:27:
 note: because ‘vtkTractographyPoint’ has user-provided ‘vtkTractographyPoint& vtkTractographyPoint::operator=(const vtkTractographyPoint&)’
   30 |     vtkTractographyPoint &operator=(const vtkTractographyPoint& hp); //for resizing
      |                           ^~~~~~~~

raised for example at:
https://github.com/SlicerDMRI/SlicerDMRI/actions/runs/6686457985/job/18165832119#step:7:310

Fix `vtkTractographyPoint` implicit declaration warning: declare the
copy constructor.

Fixes:
```
[57/263] Building CXX object Libs/vtkDMRI/CMakeFiles/vtkDMRIPython.dir/vtkTractographyPointAndArrayPython.cxx.o
SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:
 In function ‘PyObject* PyvtkTractographyPoint_vtkTractographyPoint_s2(PyObject*, PyObject*)’:
SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:53:63:
 warning: implicitly-declared ‘constexpr vtkTractographyPoint::vtkTractographyPoint(const vtkTractographyPoint&)’ is deprecated [-Wdeprecated-copy]
   53 |     vtkTractographyPoint *op = new vtkTractographyPoint(*temp0);
      |                                                               ^
In file included from SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:10:
SlicerDMRI/SlicerDMRI/Libs/vtkDMRI/vtkTractographyPointAndArray.h:30:27:
 note: because ‘vtkTractographyPoint’ has user-provided ‘vtkTractographyPoint& vtkTractographyPoint::operator=(const vtkTractographyPoint&)’
   30 |     vtkTractographyPoint &operator=(const vtkTractographyPoint& hp); //for resizing
      |                           ^~~~~~~~
SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:
 In function ‘void* PyvtkTractographyPoint_CCopy(const void*)’:
SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:180:83:
 warning: implicitly-declared ‘constexpr vtkTractographyPoint::vtkTractographyPoint(const vtkTractographyPoint&)’ is deprecated [-Wdeprecated-copy]
  180 |     return new vtkTractographyPoint(*static_cast<const vtkTractographyPoint*>(obj));
      |                                                                                   ^
In file included from SlicerDMRI/SlicerDMRI-build/inner-build/Libs/vtkDMRI/vtkTractographyPointAndArrayPython.cxx:10:
SlicerDMRI/SlicerDMRI/Libs/vtkDMRI/vtkTractographyPointAndArray.h:30:27:
 note: because ‘vtkTractographyPoint’ has user-provided ‘vtkTractographyPoint& vtkTractographyPoint::operator=(const vtkTractographyPoint&)’
   30 |     vtkTractographyPoint &operator=(const vtkTractographyPoint& hp); //for resizing
      |                           ^~~~~~~~
```

raised for example at:
https://github.com/SlicerDMRI/SlicerDMRI/actions/runs/6686457985/job/18165832119#step:7:310
@jhlegarreta jhlegarreta force-pushed the FixvtkTractographyPointImplicitDeclWarning branch from a35ef50 to 37c67ef Compare November 30, 2023 19:00
@jhlegarreta
Copy link
Contributor Author

Warnings are gone; test failures are expected.

@ljod ljod merged commit 1317e50 into SlicerDMRI:master Dec 7, 2023
1 check failed
@jhlegarreta jhlegarreta deleted the FixvtkTractographyPointImplicitDeclWarning branch December 7, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants