Skip to content

STYLE: Method local variables should not have m_ prefix#3646

Merged
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
Leengit:rename_variables
Sep 23, 2022
Merged

STYLE: Method local variables should not have m_ prefix#3646
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
Leengit:rename_variables

Conversation

@Leengit
Copy link
Copy Markdown
Contributor

@Leengit Leengit commented Sep 23, 2022

Method local variables should not have m_ prefix. That prefix is reserved for class member variables.

PR Checklist

  • No API changes were made (or the changes have been approved)
  • No major design changes were made (or the changes have been approved)
  • Added test (or behavior not changed)
  • Updated API documentation (or API not changed)
  • Added license to new files (if any)
  • Added Python wrapping to new files (if any) as described in ITK Software Guide Section 9.5
  • Added ITK examples for all new major features (if any)

@github-actions github-actions Bot added area:Core Issues affecting the Core module area:IO Issues affecting the IO module type:Style Style changes: no logic impact (indentation, comments, naming) labels Sep 23, 2022
@N-Dekker N-Dekker self-requested a review September 23, 2022 15:15
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.

Thank you Lee. Looks fine to me!

For the record, your commit could be considered a follow-up to PR #1628 commit 7f2c44c "STYLE: Use range-based loops from C++11"

@dzenanz dzenanz merged commit 4b5842f into InsightSoftwareConsortium:master Sep 23, 2022
@dzenanz dzenanz deleted the rename_variables branch September 23, 2022 19:13
@N-Dekker
Copy link
Copy Markdown
Contributor

For the record,

ITK's Coding Style Guide does indeed specify, at https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/blob/ac807207e282d075714a65060b09dd15179d5dda/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex#L756

Class data members are prepended with m_ as in m_Size. This clearly indicates the origin of data members, and differentiates them from all other variables.

👍

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:IO Issues affecting the IO 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