Skip to content

STYLE: Remove redundant virtual statements for C++11#5908

Merged
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:mainfrom
hjmjohnson:clang-tidy-rules-testing
Mar 9, 2026
Merged

STYLE: Remove redundant virtual statements for C++11#5908
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:mainfrom
hjmjohnson:clang-tidy-rules-testing

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

@hjmjohnson hjmjohnson commented Mar 8, 2026

Use virtual for the base class function declaration. This is technically
necessary.

Remove 'virtual' is implied when 'override' is specified, so remove the
redundant specification.

cd ${BLDDIR}
run-clang-tidy.py -extra-arg=-D__clang__ -checks=-,modernize-use-override -header-filter=. -fix

PR Checklist

@github-actions github-actions bot added area:Segmentation Issues affecting the Segmentation module type:Style Style changes: no logic impact (indentation, comments, naming) labels Mar 8, 2026
Comment thread Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.h
@hjmjohnson hjmjohnson changed the title STYLE: Use override statements for C++11 STYLE: Remove redundant virtual statements for C++11 Mar 9, 2026
Use virtual for the base class function declaration.  This is technically
necessary.
@hjmjohnson hjmjohnson force-pushed the clang-tidy-rules-testing branch from 6b0263f to 9ee0b6b Compare March 9, 2026 11:50
Copy link
Copy Markdown
Contributor

@N-Dekker N-Dekker left a comment

Choose a reason for hiding this comment

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

Thanks @hjmjohnson !

I still like my suggestion STYLE: Remove redundant virtual keywords from overrides, because it is more specific. But your STYLE: Remove redundant virtual keyword is good enough 👍

Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

Mostly looks good.

Comment thread Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.h
@hjmjohnson
Copy link
Copy Markdown
Member Author

/azp run ITK.macOS.Python

@hjmjohnson hjmjohnson merged commit 4169ee5 into InsightSoftwareConsortium:main Mar 9, 2026
14 of 18 checks passed
@hjmjohnson hjmjohnson deleted the clang-tidy-rules-testing branch March 12, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Segmentation Issues affecting the Segmentation module type:Style Style changes: no logic impact (indentation, comments, naming)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants