Fix the /W4 C4245 warnings: signed/unsigned mismatch.