I\'m still learning about C++ and I\'m reading everywhere that I have to use const
everywhere I can (for speed reason I think).
I\'m usually write my getter
A const getter has the signature
bool getReady() const
The other version isn't a const
method, it just returns a const
value (which is basically useless).
Having a const
getter allows you to call it on const objects:
const Object obj;
obj.getReady();
This is only valid if getReady
is marked as const
.