Skip to content

Add const to variadic write overload - #1751

Open
AnyOldName3 wants to merge 1 commit into
vsg-dev:masterfrom
AnyOldName3:const-variadic-write
Open

AnyOldName3 wants to merge 1 commit into
vsg-dev:masterfrom
AnyOldName3:const-variadic-write

Conversation

@AnyOldName3

Copy link
Copy Markdown
Contributor

Pull Request Template

Description

Add const to variadic Output::write overload

All the write implementations it can call take const pointers, so this shouldn't stop anything from compiling that worked before, but it makes this overload usable in const write implementations (which all of them are - the base signature is virtual void write(Output& output) const) without making a temporary copy of fields.

Fixes: nothing on the tracker

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

An argument could be made for this being either a bug fix or a new feature, or even just a typo fix.

How Has This Been Tested?

It still builds, and if it was going to break anything, it would stop it building.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas N/A
  • I have made corresponding changes to the documentation N/A
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works N/A
  • New and existing unit tests pass locally with my changes N/A
  • Any dependent changes have been merged and published in downstream modules N/A

All the write implementations it can call take const pointers, so this shouldn't stop anything from compiling that worked before, but it makes this overload usable in const write implementations (which all of them are) without making a temporary copy of fields.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant