eclipse-iceoryx / iceoryx

Eclipse iceoryx™ - true zero-copy inter-process-communication
https://iceoryx.io
Apache License 2.0
1.65k stars 384 forks source link

Remove const_cast wherever possible #76

Closed dkroenke closed 4 years ago

dkroenke commented 4 years ago

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.

elBoberido commented 4 years ago

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