2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-25 19:30:08 +01:00

ref: gl: replace same struct type memcpys by assignments

This commit is contained in:
Alibek Omarov 2024-07-31 00:01:45 +03:00
parent 9ab0f04ba5
commit f6fa085fe4
3 changed files with 4 additions and 5 deletions

View File

@ -569,8 +569,8 @@ int EXPORT GetRefAPI( int version, ref_interface_t *funcs, ref_api_t *engfuncs,
return 0;
// fill in our callbacks
memcpy( funcs, &gReffuncs, sizeof( ref_interface_t ));
memcpy( &gEngfuncs, engfuncs, sizeof( ref_api_t ));
*funcs = gReffuncs;
gEngfuncs = *engfuncs;
gpGlobals = globals;
gp_cl = (ref_client_t *)ENGINE_GET_PARM( PARM_GET_CLIENT_PTR );

View File

@ -281,7 +281,6 @@ void CL_DrawParticlesExternal( const ref_viewpass_t *rvp, qboolean trans_pass, f
{
ref_instance_t oldRI = RI;
memcpy( &oldRI, &RI, sizeof( ref_instance_t ));
R_SetupRefParams( rvp );
R_SetupFrustum();
R_SetupGL( false ); // don't touch GL-states
@ -290,5 +289,5 @@ void CL_DrawParticlesExternal( const ref_viewpass_t *rvp, qboolean trans_pass, f
gEngfuncs.CL_DrawEFX( frametime, trans_pass );
// restore internal state
memcpy( &RI, &oldRI, sizeof( ref_instance_t ));
RI = oldRI;
}

View File

@ -54,7 +54,7 @@ static const byte *R_SpriteLoadFrame( model_t *mod, const void *pin, mspritefram
char texname[128];
int bytes = 1;
memcpy( &pinframe, pin, sizeof(dspriteframe_t));
memcpy( &pinframe, pin, sizeof( dspriteframe_t ));
if( sprite_version == SPRITE_VERSION_32 )
bytes = 4;