Fix -Wnarrowing compiler warnings