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

quality: add 'const' qualifier to the 'MMS value' getters #416

Open
wants to merge 1 commit into
base: v1.5
Choose a base branch
from

Conversation

mbourhis
Copy link
Contributor

@mbourhis mbourhis commented Nov 4, 2022

Some getters already have the 'const' qualifier, but not all. To improve the quality of the code, add the 'const' qualifier for the other getters of 'MMS value', where it was missing.

Remark:
when a pointer is returned by a getter, this pointer must be a pointer to a constant, so as not to modify the internal data of the 'MMS value' object. The correctness of the function calls, in libiec61850, has been checked with the compiler option: '-Wdiscarded-qualifiers'.

Signed-off-by: Mikael Bourhis [email protected]

Some getters already have the 'const' qualifier, but not all.
To improve the quality of the code, add the 'const' qualifier for the other
getters of 'MMS value', where it was missing.

Remark:
when a pointer is returned by a getter, this pointer must be a pointer
to a constant, so as not to modify the internal data of the 'MMS value' object.
The correctness of the function calls, in libiec61850, has been checked with
the compiler option: '-Wdiscarded-qualifiers'.

Signed-off-by: Mikael Bourhis <[email protected]>
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