An engineer just left our project and now I am working on his project. In his dot H files there are several routines where he writes the executable code in the declaration rather than the dot C or dot CPP file. For a method with maybe one line of code I don't see a real problem with that. However he has multiple methods written like this, one of which is over 150 lines of code. (Not a comment in sight but that is a different topic.)
Is there a possible advantage in writing the code in the dot H file rather than the dot CPP file?
Seems to me its better to put all the code in one place.