C++: Is it good practice to make getters and setters inline?
- by Martijn Courteaux
Hi,
The title says it all.
public:
inline int GetValue() const {
return m_nValue;
}
inline void SetValue(int nNewValue) {
this -> m_nValue = nNewValue;
}
On Learn C++, they said it would run faster. So, I thought it would be great.
But maybe, there are some negative points to it.