How far do you go with const
? Do you just make functions const
when necessary or do you go the whole hog and use it everywhere? For example, imag
All the consts in your examples have no purpose. C++ is pass-by-value by default, so the function gets copies of those ints and booleans. Even if the function does modify them, the caller's copy is not affected.
So I'd avoid extra consts because