Revert "Fix compile cast warnings present in VS"

This reverts commit 899af3a7d6ad2535314b870f56dcf12a6b47126f.