Fix compilation problems under MSVC.

Remove `inline' specifier (compilers can inline automatically, anyway);
Move the order of local variable declaration to avoid compilation problems.