In headers, if an inline function is declared inline in its implementation .cpp file, do i also need to add the inline keyword to the prototype in the .h file as well? It seems to compile either way.
If the function is implemented in the .cpp file and not the header file, then the function can be inlined only in the translation unit in which it is visible (ie, the .cpp file where it is implemented).
Move it to the header file.
And some compilers do complain even in the same header file if the function is declared inline but then it's implementation does not have the keyword inline on it (or vice versa).