Switch playsave.cpp to static_cast

This commit is contained in:
Kp 2016-09-04 00:02:53 +00:00
parent 848b99376d
commit 11609fcdc4

View file

@ -427,7 +427,7 @@ static void read_player_dxx(const char *filename)
continue;
#if defined(DXX_BUILD_DESCENT_I)
if(!strcmp(line,COCKPIT_MODE_NAME_TEXT))
PlayerCfg.CockpitMode[0] = PlayerCfg.CockpitMode[1] = (cockpit_mode_t) atoi(value);
PlayerCfg.CockpitMode[0] = PlayerCfg.CockpitMode[1] = static_cast<cockpit_mode_t>(atoi(value));
else
#endif
if(!strcmp(line,COCKPIT_HUD_NAME_TEXT))
@ -946,7 +946,7 @@ int read_player_file()
PlayerCfg.DefaultDifficulty = PHYSFSX_readByte(file);
PlayerCfg.AutoLeveling = PHYSFSX_readByte(file);
PHYSFS_seek(file,PHYSFS_tell(file)+sizeof(sbyte)); // skip ReticleOn
PlayerCfg.CockpitMode[0] = PlayerCfg.CockpitMode[1] = (cockpit_mode_t)PHYSFSX_readByte(file);
PlayerCfg.CockpitMode[0] = PlayerCfg.CockpitMode[1] = static_cast<cockpit_mode_t>(PHYSFSX_readByte(file));
PHYSFS_seek(file,PHYSFS_tell(file)+sizeof(sbyte)); //skip Default_display_mode
{
auto i = PHYSFSX_readByte(file);