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

Remove const_cast wherever possible #76

Closed
dkroenke opened this issue Mar 24, 2020 · 1 comment · Fixed by #103
Closed

Remove const_cast wherever possible #76

dkroenke opened this issue Mar 24, 2020 · 1 comment · Fixed by #103
Labels
CERT Warning of a SEI CERT C++ 2016 rule MISRA Warning of a MISRA C++2008 rule refactoring Refactor code without adding features

Comments

@dkroenke
Copy link
Member

Brief feature description:
Check the necessity of all occurring const_casts and remove them if possible.

Detailed information:
To check/improve const correctness in iceoryx we should take a look at all occurring const_casts and refactor them if possible.

@dkroenke dkroenke added the refactoring Refactor code without adding features label Mar 24, 2020
@elBoberido
Copy link
Member

in some places its just like

int foo() const;
int foo();

where foo calls foo() const
this could probably be fixed by

int foo() const;
int foo();
private:
int foo_impl() const;

then foo() and foo() const can just call foo_impl() const

@mossmaurice mossmaurice added CERT Warning of a SEI CERT C++ 2016 rule MISRA Warning of a MISRA C++2008 rule labels May 12, 2020
elBoberido pushed a commit to elBoberido/iceoryx that referenced this issue May 14, 2020
Signed-off-by: Sumedha Maharudrayya Mathad (RBEI/ESU4) <SumedhaMaharudrayya.Mathad@in.bosch.com>
elBoberido pushed a commit to elBoberido/iceoryx that referenced this issue May 14, 2020
Signed-off-by: Sumedha Maharudrayya Mathad (RBEI/ESU4) <SumedhaMaharudrayya.Mathad@in.bosch.com>
elBoberido pushed a commit to elBoberido/iceoryx that referenced this issue May 14, 2020
Signed-off-by: Sumedha Maharudrayya Mathad (RBEI/ESU4) <SumedhaMaharudrayya.Mathad@in.bosch.com>
elBoberido pushed a commit to elBoberido/iceoryx that referenced this issue May 14, 2020
Signed-off-by: Sumedha Maharudrayya Mathad (RBEI/ESU4) <SumedhaMaharudrayya.Mathad@in.bosch.com>
elBoberido pushed a commit to elBoberido/iceoryx that referenced this issue May 14, 2020
Signed-off-by: Lehmann Marika (CC-AD/ESW1) <Marika.Lehmann2@de.bosch.com>
@mossmaurice mossmaurice linked a pull request May 14, 2020 that will close this issue
elBoberido pushed a commit to elBoberido/iceoryx that referenced this issue May 20, 2020
Signed-off-by: Lehmann Marika (CC-AD/ESW1) <Marika.Lehmann2@de.bosch.com>
elBoberido added a commit that referenced this issue May 20, 2020
…rever-possible

Iox #76 remove const cast wherever possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CERT Warning of a SEI CERT C++ 2016 rule MISRA Warning of a MISRA C++2008 rule refactoring Refactor code without adding features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants