Skip to content

Commit b69be81

Browse files
author
nitrocaster
committed
Remove deprecated memcpy/memset implementations and wrappers.
1 parent 3e5ac56 commit b69be81

39 files changed

+535
-903
lines changed

src/Layers/xrRender/D3DUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ void SPrimitiveBuffer::CreateFromData(D3DPRIMITIVETYPE _pt, u32 _p_cnt, u32 FVF,
113113
FLvertexVec verts (v_cnt);
114114
for (u32 k=0; k<v_cnt; ++k)
115115
verts[k].set (((Fvector*)vertices)[k],0xFFFFFFFF);
116-
Memory.mem_copy (bytes,&*verts.begin(),v_cnt*stride);
116+
memcpy (bytes,&*verts.begin(),v_cnt*stride);
117117
R_CHK (pVB->Unlock());
118118
if (i_cnt){
119119
R_CHK(HW.pDevice->CreateIndexBuffer (i_cnt*sizeof(u16),D3DUSAGE_WRITEONLY,D3DFMT_INDEX16,D3DPOOL_MANAGED,&pIB,NULL));
120120
HW.stats_manager.increment_stats_ib (pIB);
121121
R_CHK (pIB->Lock(0,0,(LPVOID*)&bytes,0));
122-
Memory.mem_copy (bytes,indices,i_cnt*sizeof(u16));
122+
memcpy (bytes,indices,i_cnt*sizeof(u16));
123123
R_CHK (pIB->Unlock());
124124
OnRender.bind (this,&SPrimitiveBuffer::RenderDIP);
125125
}else{

src/Layers/xrRender/R_Backend_Runtime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void CBackend::OnFrameBegin ()
5454
set_RT (HW.pBaseRT);
5555
set_ZB (HW.pBaseZB);
5656
#endif // USE_DX10
57-
Memory.mem_fill (&stat,0,sizeof(stat));
57+
memset (&stat,0,sizeof(stat));
5858
Vertex.Flush ();
5959
Index.Flush ();
6060
set_Stencil (FALSE);

src/Layers/xrRender/SH_Constant.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ECORE_API CConstant : public xr_resource_named {
2323

2424
CConstant ()
2525
{
26-
Memory.mem_fill (this,0,sizeof(CConstant));
26+
memset (this,0,sizeof(CConstant));
2727
}
2828
IC void set_float (float r, float g, float b, float a)
2929
{

src/Layers/xrRender/SH_Matrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ECORE_API CMatrix : public xr_resource_named {
3232

3333
CMatrix ()
3434
{
35-
Memory.mem_fill (this,0,sizeof(CMatrix));
35+
memset (this,0,sizeof(CMatrix));
3636
}
3737

3838
IC void tc_trans (Fmatrix& T, float u, float v)

src/Layers/xrRender/occRasterizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ void occRasterizer::clear ()
6767
{
6868
u32 size = occ_dim*occ_dim;
6969
float f = 1.f;
70-
Memory.mem_fill32 (bufFrame,0,size);
71-
Memory.mem_fill32 (bufDepth,*LPDWORD(&f),size);
70+
memset (bufFrame,0,size);
71+
memset (bufDepth,*LPDWORD(&f),size);
7272
}
7373

7474
IC BOOL shared(occTri* T1, occTri* T2)

src/editors/ECore/Editor/EditMeshIO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ bool CEditableMesh::LoadMesh(IReader &F)
135135
F.r(m_Faces, m_FaceCount*sizeof(st_Face));
136136

137137
m_SmoothGroups = xr_alloc<u32>(m_FaceCount);
138-
Memory.mem_fill32(m_SmoothGroups, m_Flags.is(flSGMask) ? 0 : u32(-1), m_FaceCount);
138+
memset(m_SmoothGroups, m_Flags.is(flSGMask) ? 0 : u32(-1), m_FaceCount);
139139
u32 sg_chunk_size = F.find_chunk(EMESH_CHUNK_SG);
140140
if (sg_chunk_size)
141141
{

src/editors/ECore/Editor/EditMeshModify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void CEditableMesh::OptimizeMesh(BOOL NoOpt)
299299
m_VertCount = m_NewPoints.size();
300300
xr_free(m_Vertices);
301301
m_Vertices = xr_alloc<Fvector>(m_VertCount);
302-
Memory.mem_copy(m_Vertices, &*m_NewPoints.begin(), m_NewPoints.size()*sizeof(Fvector));
302+
memcpy(m_Vertices, &*m_NewPoints.begin(), m_NewPoints.size()*sizeof(Fvector));
303303

304304
if (i_del_face)
305305
{

0 commit comments

Comments
 (0)