C++ inline vs. method

I updated the code.