Skip to content

Commit

Permalink
Remove deprecated memcpy/memset implementations and wrappers.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Jan 15, 2016
1 parent 3e5ac56 commit b69be81
Show file tree
Hide file tree
Showing 39 changed files with 535 additions and 903 deletions.
4 changes: 2 additions & 2 deletions src/Layers/xrRender/D3DUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ void SPrimitiveBuffer::CreateFromData(D3DPRIMITIVETYPE _pt, u32 _p_cnt, u32 FVF,
FLvertexVec verts (v_cnt);
for (u32 k=0; k<v_cnt; ++k)
verts[k].set (((Fvector*)vertices)[k],0xFFFFFFFF);
Memory.mem_copy (bytes,&*verts.begin(),v_cnt*stride);
memcpy (bytes,&*verts.begin(),v_cnt*stride);
R_CHK (pVB->Unlock());
if (i_cnt){
R_CHK(HW.pDevice->CreateIndexBuffer (i_cnt*sizeof(u16),D3DUSAGE_WRITEONLY,D3DFMT_INDEX16,D3DPOOL_MANAGED,&pIB,NULL));
HW.stats_manager.increment_stats_ib (pIB);
R_CHK (pIB->Lock(0,0,(LPVOID*)&bytes,0));
Memory.mem_copy (bytes,indices,i_cnt*sizeof(u16));
memcpy (bytes,indices,i_cnt*sizeof(u16));
R_CHK (pIB->Unlock());
OnRender.bind (this,&SPrimitiveBuffer::RenderDIP);
}else{
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/R_Backend_Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void CBackend::OnFrameBegin ()
set_RT (HW.pBaseRT);
set_ZB (HW.pBaseZB);
#endif // USE_DX10
Memory.mem_fill (&stat,0,sizeof(stat));
memset (&stat,0,sizeof(stat));
Vertex.Flush ();
Index.Flush ();
set_Stencil (FALSE);
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/SH_Constant.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ECORE_API CConstant : public xr_resource_named {

CConstant ()
{
Memory.mem_fill (this,0,sizeof(CConstant));
memset (this,0,sizeof(CConstant));
}
IC void set_float (float r, float g, float b, float a)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/SH_Matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ECORE_API CMatrix : public xr_resource_named {

CMatrix ()
{
Memory.mem_fill (this,0,sizeof(CMatrix));
memset (this,0,sizeof(CMatrix));
}

IC void tc_trans (Fmatrix& T, float u, float v)
Expand Down
4 changes: 2 additions & 2 deletions src/Layers/xrRender/occRasterizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void occRasterizer::clear ()
{
u32 size = occ_dim*occ_dim;
float f = 1.f;
Memory.mem_fill32 (bufFrame,0,size);
Memory.mem_fill32 (bufDepth,*LPDWORD(&f),size);
memset (bufFrame,0,size);
memset (bufDepth,*LPDWORD(&f),size);
}

IC BOOL shared(occTri* T1, occTri* T2)
Expand Down
2 changes: 1 addition & 1 deletion src/editors/ECore/Editor/EditMeshIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ bool CEditableMesh::LoadMesh(IReader &F)
F.r(m_Faces, m_FaceCount*sizeof(st_Face));

m_SmoothGroups = xr_alloc<u32>(m_FaceCount);
Memory.mem_fill32(m_SmoothGroups, m_Flags.is(flSGMask) ? 0 : u32(-1), m_FaceCount);
memset(m_SmoothGroups, m_Flags.is(flSGMask) ? 0 : u32(-1), m_FaceCount);
u32 sg_chunk_size = F.find_chunk(EMESH_CHUNK_SG);
if (sg_chunk_size)
{
Expand Down
2 changes: 1 addition & 1 deletion src/editors/ECore/Editor/EditMeshModify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void CEditableMesh::OptimizeMesh(BOOL NoOpt)
m_VertCount = m_NewPoints.size();
xr_free(m_Vertices);
m_Vertices = xr_alloc<Fvector>(m_VertCount);
Memory.mem_copy(m_Vertices, &*m_NewPoints.begin(), m_NewPoints.size()*sizeof(Fvector));
memcpy(m_Vertices, &*m_NewPoints.begin(), m_NewPoints.size()*sizeof(Fvector));

if (i_del_face)
{
Expand Down
Loading

0 comments on commit b69be81

Please sign in to comment.