Closed naterpotatoers closed 2 years ago
In Data Structures and Algorithm Analysis in C++ by Mark Allen Weiss he claims that accessor (getters) should be marked with the
const
keyword. Otherwise member functions are technically mutators by default. This is the same case for any locally scoped variables that shouldn't have its value updated as a best practice to prevent possible bugs
ah interesting, never thought of this but sounds like it's a good way to avoid bugs!
Looking into this now.
Done for arm, just have to get someone to do it for drive.
I can do it when I get back on in the morning
Done for arm, just have to get someone to do it for drive.
Maybe we also do it for the rover_arm_system.hpp file?
done
In Data Structures and Algorithm Analysis in C++ by Mark Allen Weiss he claims that accessor (getters) should be marked with the
const
keyword. Otherwise member functions are technically mutators by default. This is the same case for any locally scoped variables that shouldn't have its value updated as a best practice to prevent possible bugs