Skip to content

Remove unnecessary FIXIT section in grfmt_tiff.cpp#25447

Merged
asmorkalov merged 2 commits intoopencv:4.xfrom
vrabaud:tiff
Apr 19, 2024
Merged

Remove unnecessary FIXIT section in grfmt_tiff.cpp#25447
asmorkalov merged 2 commits intoopencv:4.xfrom
vrabaud:tiff

Conversation

@vrabaud
Copy link
Copy Markdown
Contributor

@vrabaud vrabaud commented Apr 18, 2024

No int64/uint64 is used in the code anymore.

grfmt_tiff.hpp includes the tiff.h header inside of the tiff_dummy_namespace declaration. One implication of this is that all namespaced declarations made in tiff.h become qualified with tiff_dummy_namespace::.

Because tiff.h includes standard library headers, the std namespace declarations are converted to tiff_dummy_namespace::std declarations.

Subsequently, grfmt_tiff.hpp declares using namespace tiff_dummy_namespace;.

This can lead to an ambiguity error during the resolution of the std namespace.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work

No int64/uint64 is used inthe code anymore.

grfmt_tiff.hpp includes the tiff.h header inside of the tiff_dummy_namespace
declaration. One implication of this is that all namespaced declarations
made in tiff.h become qualified with tiff_dummy_namespace::.

Because tiff.h includes standard library headers, the std namespace
declarations are converted to tiff_dummy_namespace::std declarations.

Subsequently, grfmt_tiff.hpp declares using namespace tiff_dummy_namespace;.

This can lead to an ambiguity error during the resolution of the std namespace.
@vrabaud
Copy link
Copy Markdown
Contributor Author

vrabaud commented Apr 18, 2024

Fixes were already made in #25096

@vrabaud vrabaud closed this Apr 18, 2024
@vrabaud vrabaud reopened this Apr 18, 2024
@vrabaud
Copy link
Copy Markdown
Contributor Author

vrabaud commented Apr 18, 2024

Actually, this is still problematic. Using pure C++ types is the way to go. There are only conflicts with int64 usually (defined as long long int or int64_t), which is unused in the code.

@asmorkalov asmorkalov added cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code) category: imgcodecs labels Apr 18, 2024
@asmorkalov asmorkalov added this to the 4.10.0 milestone Apr 18, 2024
@asmorkalov asmorkalov self-requested a review April 19, 2024 08:37
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

Tested manually with Ubuntu 16.04, 18.04.

@asmorkalov asmorkalov self-assigned this Apr 19, 2024
@asmorkalov asmorkalov merged commit fc5eb10 into opencv:4.x Apr 19, 2024
@asmorkalov asmorkalov mentioned this pull request Apr 19, 2024
klatism pushed a commit to klatism/opencv that referenced this pull request May 17, 2024
Remove unnecessary FIXIT section in grfmt_tiff.cpp opencv#25447

No int64/uint64 is used in the code anymore.

grfmt_tiff.hpp includes the tiff.h header inside of the tiff_dummy_namespace declaration. One implication of this is that all namespaced declarations made in tiff.h become qualified with tiff_dummy_namespace::.

Because tiff.h includes standard library headers, the std namespace declarations are converted to tiff_dummy_namespace::std declarations.

Subsequently, grfmt_tiff.hpp declares using namespace tiff_dummy_namespace;.

This can lead to an ambiguity error during the resolution of the std namespace.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: imgcodecs cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants