Fix msvc warnings
This merge request fixes several warnings from MSVC compiler. These changes are mainly type changes and some explicit casts.
This merge request fixes several warnings from MSVC compiler. These changes are mainly type changes and some explicit casts.