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: Avoid re-init of ostringstream in ThresholdImageFilterTest #4945

Closed
wants to merge 1 commit into from

Conversation

thewtex
Copy link
Member

@thewtex thewtex commented Nov 11, 2024

This is to work around build failures on Intel macOS:

Filtering/Thresholding/test/itkThresholdImageFilterTest.cxx:79:8: error: no viable overloaded '='
os = {};
~~ ^ ~~

Also, it is more efficient to clear the std::ostringstream
object using os.str(""); rather than reinitializing it. This avoids
unnecessary reallocation and keeps the code cleaner.

This is to work around build failures on Intel macOS:

> Filtering/Thresholding/test/itkThresholdImageFilterTest.cxx:79:8: error: no viable overloaded '='
    os = {};
    ~~ ^ ~~

Also, it is more efficient to clear the std::ostringstream
object using os.str(""); rather than reinitializing it. This avoids
unnecessary reallocation and keeps the code cleaner.
@thewtex thewtex closed this Nov 11, 2024
@thewtex thewtex deleted the threshold-test-stream-initialization branch November 11, 2024 14:24
@github-actions github-actions bot added type:Compiler Compiler support or related warnings type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Filtering Issues affecting the Filtering module labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Filtering Issues affecting the Filtering module type:Compiler Compiler support or related warnings type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant