From 847f58bf8c5b4b56e387416a1a720d6baec2014b Mon Sep 17 00:00:00 2001 From: Night Owl Date: Wed, 19 Sep 2018 05:36:38 +0500 Subject: [PATCH] Remove unneeded casts. --- dlls/hs/boombox.cpp | 18 +++++++++--------- dlls/hs/chrischan.cpp | 8 ++++---- dlls/hs/ctf_gameplay.cpp | 5 +++-- dlls/hs/gayglenn.cpp | 12 ++++++------ dlls/hs/hs_model.cpp | 4 ++-- dlls/hs/sinistar.cpp | 14 +++++++------- dlls/hs/xmast.cpp | 10 +++++----- 7 files changed, 36 insertions(+), 35 deletions(-) diff --git a/dlls/hs/boombox.cpp b/dlls/hs/boombox.cpp index 09597bef..1a2cce54 100644 --- a/dlls/hs/boombox.cpp +++ b/dlls/hs/boombox.cpp @@ -35,13 +35,13 @@ enum gauss_e { const char *CBoombox::pBoomboxSongs[] = { -"bbox/song1.wav", -"bbox/song2.wav", -"bbox/song3.wav", -"bbox/song4.wav", -"bbox/song5.wav", -"bbox/song6.wav", -"bbox/song7.wav" + "bbox/song1.wav", + "bbox/song2.wav", + "bbox/song3.wav", + "bbox/song4.wav", + "bbox/song5.wav", + "bbox/song6.wav", + "bbox/song7.wav" }; void CBoombox::Spawn( ) @@ -62,7 +62,7 @@ void CBoombox::Precache( void ) PRECACHE_MODEL("models/w_boombox.mdl"); PRECACHE_MODEL("models/p_boombox.mdl"); for ( i = 0; i < ARRAYSIZE( pBoomboxSongs ); i++ ) - PRECACHE_SOUND((char *)pBoomboxSongs[i]); + PRECACHE_SOUND(pBoomboxSongs[i]); PRECACHE_SOUND("bbox/xmassong.wav"); PRECACHE_SOUND("bbox/songrc.wav"); @@ -100,7 +100,7 @@ void CBoombox::Holster( int skiplocal /* = 0 */ ) SendWeaponAnim( BOOMBOX_HOLSTER ); for ( i = 0; i < ARRAYSIZE( pBoomboxSongs ); i++ ) { - STOP_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, pBoomboxSongs[i]); + STOP_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, pBoomboxSongs[i]); } } diff --git a/dlls/hs/chrischan.cpp b/dlls/hs/chrischan.cpp index 5d4f0a6c..2ed8b13a 100644 --- a/dlls/hs/chrischan.cpp +++ b/dlls/hs/chrischan.cpp @@ -192,10 +192,10 @@ void CChrisChan :: Precache() SonicRings = PRECACHE_MODEL("sprites/s2ring.spr");// client side spittle of coins! int i; - for ( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ ) - PRECACHE_SOUND((char *)pIdleSounds[i]); - for ( i = 0; i < ARRAYSIZE( pPainSounds ); i++ ) - PRECACHE_SOUND((char *)pPainSounds[i]); + for ( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ ) + PRECACHE_SOUND(pIdleSounds[i]); + for ( i = 0; i < ARRAYSIZE( pPainSounds ); i++ ) + PRECACHE_SOUND(pPainSounds[i]); } //========================================================= diff --git a/dlls/hs/ctf_gameplay.cpp b/dlls/hs/ctf_gameplay.cpp index 7c092a71..1b83231f 100644 --- a/dlls/hs/ctf_gameplay.cpp +++ b/dlls/hs/ctf_gameplay.cpp @@ -212,7 +212,7 @@ void CCaptureTeam1 :: Spawn( ) void CCaptureTeam1 :: Precache( ) { - PRECACHE_MODEL( (char*)STRING(pev->model) ); + PRECACHE_MODEL( STRING(pev->model) ); } void CCaptureTeam1 :: Think( ) { @@ -328,8 +328,9 @@ void CCaptureTeam2 :: Spawn( ) void CCaptureTeam2 :: Precache( ) { - PRECACHE_MODEL( (char*)STRING(pev->model) ); + PRECACHE_MODEL( STRING(pev->model) ); } + void CCaptureTeam2 :: Think( ) { // loop through every player and check if they are in the area diff --git a/dlls/hs/gayglenn.cpp b/dlls/hs/gayglenn.cpp index c66a03af..a60ffa25 100644 --- a/dlls/hs/gayglenn.cpp +++ b/dlls/hs/gayglenn.cpp @@ -269,19 +269,19 @@ void CGay :: Precache() PRECACHE_MODEL("models/chris.mdl"); for ( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ ) - PRECACHE_SOUND((char *)pAttackHitSounds[i]); + PRECACHE_SOUND(pAttackHitSounds[i]); for ( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ ) - PRECACHE_SOUND((char *)pAttackMissSounds[i]); + PRECACHE_SOUND(pAttackMissSounds[i]); for ( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ ) - PRECACHE_SOUND((char *)pAttackSounds[i]); + PRECACHE_SOUND(pAttackSounds[i]); for ( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ ) - PRECACHE_SOUND((char *)pIdleSounds[i]); + PRECACHE_SOUND(pIdleSounds[i]); for ( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ ) - PRECACHE_SOUND((char *)pAlertSounds[i]); + PRECACHE_SOUND(pAlertSounds[i]); } //========================================================= @@ -313,4 +313,4 @@ int CGay::IgnoreConditions ( void ) return iIgnore; -} \ No newline at end of file +} diff --git a/dlls/hs/hs_model.cpp b/dlls/hs/hs_model.cpp index 133da630..d8e43c94 100644 --- a/dlls/hs/hs_model.cpp +++ b/dlls/hs/hs_model.cpp @@ -53,7 +53,7 @@ IMPLEMENT_SAVERESTORE( CHSModel, CBaseMonster ); class CGeneriCHSModel : public CHSModel { public: - void Spawn( void ) { GeneriCHSModelSpawn( (char *)STRING(pev->model), Vector(-16, -16, 0), Vector(16, 16, 72) ); } + void Spawn( void ) { GeneriCHSModelSpawn( STRING(pev->model), Vector(-16, -16, 0), Vector(16, 16, 72) ); } }; LINK_ENTITY_TO_CLASS( hs_model, CGeneriCHSModel ); @@ -184,7 +184,7 @@ void CHSModelSprite::Spawn( void ) m_animate = 1; m_lastTime = gpGlobals->time; - PRECACHE_MODEL( (char *)STRING(pev->model) ); + PRECACHE_MODEL( STRING(pev->model) ); SET_MODEL( ENT(pev), STRING(pev->model) ); m_maxFrame = (float) MODEL_FRAMES( pev->modelindex ) - 1; diff --git a/dlls/hs/sinistar.cpp b/dlls/hs/sinistar.cpp index 1881011e..81e5ee72 100644 --- a/dlls/hs/sinistar.cpp +++ b/dlls/hs/sinistar.cpp @@ -304,22 +304,22 @@ void CSinistar :: Precache() PRECACHE_MODEL("models/sinistar.mdl"); for ( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ ) - PRECACHE_SOUND((char *)pAttackHitSounds[i]); + PRECACHE_SOUND(pAttackHitSounds[i]); for ( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ ) - PRECACHE_SOUND((char *)pAttackMissSounds[i]); + PRECACHE_SOUND(pAttackMissSounds[i]); for ( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ ) - PRECACHE_SOUND((char *)pAttackSounds[i]); + PRECACHE_SOUND(pAttackSounds[i]); for ( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ ) - PRECACHE_SOUND((char *)pIdleSounds[i]); + PRECACHE_SOUND(pIdleSounds[i]); for ( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ ) - PRECACHE_SOUND((char *)pAlertSounds[i]); + PRECACHE_SOUND(pAlertSounds[i]); for ( i = 0; i < ARRAYSIZE( pPainSounds ); i++ ) - PRECACHE_SOUND((char *)pPainSounds[i]); + PRECACHE_SOUND(pPainSounds[i]); } //========================================================= @@ -351,4 +351,4 @@ int CSinistar::IgnoreConditions ( void ) return iIgnore; -} \ No newline at end of file +} diff --git a/dlls/hs/xmast.cpp b/dlls/hs/xmast.cpp index 7b2b4fbf..99a04647 100644 --- a/dlls/hs/xmast.cpp +++ b/dlls/hs/xmast.cpp @@ -295,19 +295,19 @@ void CXmast :: Precache() PRECACHE_MODEL("models/xmastreem.mdl"); for ( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ ) - PRECACHE_SOUND((char *)pAttackHitSounds[i]); + PRECACHE_SOUND(pAttackHitSounds[i]); for ( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ ) - PRECACHE_SOUND((char *)pAttackMissSounds[i]); + PRECACHE_SOUND(pAttackMissSounds[i]); for ( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ ) - PRECACHE_SOUND((char *)pAttackSounds[i]); + PRECACHE_SOUND(pAttackSounds[i]); for ( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ ) - PRECACHE_SOUND((char *)pAlertSounds[i]); + PRECACHE_SOUND(pAlertSounds[i]); for ( i = 0; i < ARRAYSIZE( pPainSounds ); i++ ) - PRECACHE_SOUND((char *)pPainSounds[i]); + PRECACHE_SOUND(pPainSounds[i]); } //=========================================================