class MyClass {If the function body is defined in class source file instead in the class definition in the header file, the trailing const is also necessary:
int value;
...
public:
int value(void) const
{
return m_value;
}
int valueSquared(void) const;
}
int MyClass::valueSquared(void) constThe functions in the Table, Token and Translator classes that don't modify the instances were made constant functions. The Parser class doesn't have any non-modifying access functions. The getToken() function was also renamed to the more consistent token(). This is a good place to create another development tag: v0.2-4.
{
return m_value * m_value;
}
[commit af69957e69]