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

Remove std:: prefix from uint8_t in MathematicalMorphologyEnums, replace <cstdint> with "itkIntTypes.h" #4387

Conversation

N-Dekker
Copy link
Contributor

@N-Dekker N-Dekker commented Jan 9, 2024

Follow-up to pull request #3250 commit c173dfd "STYLE: Remove std:: prefix from types that work without it" by Lee Newberg (@Leengit), March 6, 2022.


Mentioned at https://discourse.itk.org/t/itkmathematicalmorphologyenums-h-compile-error-with-gcc-13-on-linux/6377/4

Follow-up to pull request InsightSoftwareConsortium#3250
commit c173dfd
"STYLE: Remove `std::` prefix from types that work without it"
Lee Newberg, March 6, 2022.
@github-actions github-actions bot added area:Filtering Issues affecting the Filtering module type:Style Style changes: no logic impact (indentation, comments, naming) labels Jan 9, 2024
@N-Dekker N-Dekker marked this pull request as ready for review January 9, 2024 13:05
@Leengit
Copy link
Contributor

Leengit commented Jan 9, 2024

Should we make similar include file changes in?:

  • Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx
  • Modules/Core/Common/include/itkSpatialOrientation.h
  • Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h
  • Modules/Core/Common/include/itkIntTypes.h
  • Modules/Core/Common/src/itkMemoryUsageObserver.cxx
  • Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h

"itkIntTypes.h" adds aliases of the types from `<cstdint>` to the `itk`
namespace, allowing those types to be used without `std::` prefix.

Suggested by Lee Newberg.
@N-Dekker N-Dekker marked this pull request as draft January 9, 2024 14:52
@github-actions github-actions bot added the area:Core Issues affecting the Core module label Jan 9, 2024
@N-Dekker
Copy link
Contributor Author

N-Dekker commented Jan 9, 2024

Should we make similar include file changes in?:

* Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx
* Modules/Core/Common/include/itkSpatialOrientation.h
* Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h

Thanks @Leengit, I just did these three, with the second commit!

* Modules/Core/Common/include/itkIntTypes.h
* Modules/Core/Common/src/itkMemoryUsageObserver.cxx
* Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h

Didn't do itkIntTypes.h, of course, to avoid an #include recursion hell 🙀

Didn't do itkMemoryUsageObserver.cxx, because I don't really know why it does #include <cstdint> only for Apple. 🤷

itkMathematicalMorphologyEnums.h done by the first commit, of course 😄

@N-Dekker N-Dekker changed the title STYLE: Remove std:: prefix from uint8_t in MathematicalMorphologyEnums Remove std:: prefix from uint8_t in MathematicalMorphologyEnums, replace <cstdint> with "itkIntTypes.h" Jan 9, 2024
Copy link
Contributor

@Leengit Leengit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you.

@N-Dekker N-Dekker marked this pull request as ready for review January 9, 2024 16:04
Copy link
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔢

@dzenanz dzenanz merged commit c8ec91c into InsightSoftwareConsortium:master Jan 10, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module type:Style Style changes: no logic impact (indentation, comments, naming)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants