PDA

View Full Version : inline function in qdatetime.h



jamadagni
17th March 2007, 08:59
In qt-x11-opensource-src-4.2.2/src/corelib/tools/qdatetime.h, line 40 has

bool isNull() const { return jd == 0; }
and line 101 has

inline int toJulianDay() const { return jd; }
As I understand it, all functions defined inside a class definition are automatically inline. Then why does line 101 have the inline keyword while line 40 does not? Is there any special meaning?

high_flyer
17th March 2007, 09:28
my guess is that the two functions were not written by the same person or/and at the same time.
There is no difference between the two declerations from the compilers perspective.