[Core] Improve readability of the code and avoid visual studio warning c4996 [c2086]
I don't think this can cause trouble with gcc but let me know if its the case.

(based on commit [12595] - 7e14a6c)