Skip to content

Commit fa081b4

Browse files
committed
xrCore mk_pair replaced by std::make_pair
1 parent 8bc6bf8 commit fa081b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+101
-101
lines changed

src/Layers/xrRender/Blender_Recorder_R2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#pragma hdrstop
33

44
#include "ResourceManager.h"
5-
#include "blenders\Blender_Recorder.h"
6-
#include "blenders\Blender.h"
5+
#include "blenders/Blender_Recorder.h"
6+
#include "blenders/Blender.h"
77

88
void fix_texture_name(LPSTR fn);
99

@@ -93,7 +93,7 @@ u32 CBlender_Compile::i_Sampler(LPCSTR _name)
9393
void CBlender_Compile::i_Texture(u32 s, LPCSTR name)
9494
{
9595
if (name)
96-
passTextures.push_back(mk_pair(s, ref_texture(RImplementation.Resources->_CreateTexture(name))));
96+
passTextures.push_back(std::make_pair(s, ref_texture(RImplementation.Resources->_CreateTexture(name))));
9797
}
9898
void CBlender_Compile::i_Projective(u32 s, bool b)
9999
{

src/Layers/xrRender/ColorMapManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void ColorMapManager::UpdateTexture(const shared_str& strTexName, int iTex)
3434
ref_texture tmp;
3535
tmp.create(strTexName.c_str());
3636

37-
m_TexCache.insert(mk_pair(strTexName, tmp));
37+
m_TexCache.insert(std::make_pair(strTexName, tmp));
3838

3939
ID3DBaseTexture* e0 = tmp->surface_get();
4040
m_CMap[iTex]->surface_set(e0);

src/Layers/xrRender/ModelPool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ dxRender_Visual* CModelPool::Create(const char* name, IReader* data)
256256
}
257257
// 3. If found - return (cloned) reference
258258
dxRender_Visual* Model = Instance_Duplicate(Base);
259-
Registry.insert(mk_pair(Model, low_name));
259+
Registry.insert(std::make_pair(Model, low_name));
260260
return Model;
261261
}
262262
}
@@ -303,7 +303,7 @@ void CModelPool::DeleteInternal(dxRender_Visual*& V, BOOL bDiscard)
303303
if (it != Registry.end())
304304
{
305305
// Registry entry found - move it to pool
306-
Pool.insert(mk_pair(it->second, V));
306+
Pool.insert(std::make_pair(it->second, V));
307307
}
308308
else
309309
{

src/Layers/xrRender/ResourceManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void CResourceManager::ED_UpdateBlender(LPCSTR Name, IBlender* data)
9898
}
9999
else
100100
{
101-
m_blenders.insert(mk_pair(xr_strdup(Name), data));
101+
m_blenders.insert(std::make_pair(xr_strdup(Name), data));
102102
}
103103
}
104104

@@ -441,7 +441,7 @@ void CResourceManager::_DumpMemoryUsage()
441441
{
442442
u32 m = I->second->flags.MemoryUsage;
443443
shared_str n = I->second->cName;
444-
mtex.insert(mk_pair(m, mk_pair(I->second->dwReference, n)));
444+
mtex.insert(std::make_pair(m, std::make_pair(I->second->dwReference, n)));
445445
}
446446
}
447447

src/Layers/xrRender/ResourceManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class ECORE_API CResourceManager
216216
void Delete(const Shader* S);
217217
void RegisterConstantSetup(LPCSTR name, R_constant_setup* s)
218218
{
219-
v_constant_setup.push_back(mk_pair(shared_str(name), s));
219+
v_constant_setup.push_back(std::make_pair(shared_str(name), s));
220220
}
221221

222222
SGeometry* CreateGeom(D3DVERTEXELEMENT9* decl, ID3DVertexBuffer* vb, ID3DIndexBuffer* ib);

src/Layers/xrRender/ResourceManager_Loader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void CResourceManager::OnDeviceCreate(IReader* F)
111111
chunk->seek(0);
112112
B->Load(*chunk, desc.version);
113113

114-
std::pair<map_BlenderIt, bool> I = m_blenders.insert(mk_pair(xr_strdup(desc.cName), B));
114+
std::pair<map_BlenderIt, bool> I = m_blenders.insert(std::make_pair(xr_strdup(desc.cName), B));
115115
R_ASSERT2(I.second, "shader.xr - found duplicate name!!!");
116116
}
117117
chunk->close();

src/Layers/xrRender/ResourceManager_Resources.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ SVS* CResourceManager::_CreateVS(LPCSTR _name)
179179
{
180180
SVS* _vs = new SVS();
181181
_vs->dwFlags |= xr_resource_flagged::RF_REGISTERED;
182-
m_vs.insert(mk_pair(_vs->set_name(name), _vs));
182+
m_vs.insert(std::make_pair(_vs->set_name(name), _vs));
183183
if (0 == stricmp(_name, "null"))
184184
{
185185
_vs->vs = NULL;
@@ -265,7 +265,7 @@ SPS* CResourceManager::_CreatePS(LPCSTR name)
265265
{
266266
SPS* _ps = new SPS();
267267
_ps->dwFlags |= xr_resource_flagged::RF_REGISTERED;
268-
m_ps.insert(mk_pair(_ps->set_name(name), _ps));
268+
m_ps.insert(std::make_pair(_ps->set_name(name), _ps));
269269
if (0 == stricmp(name, "null"))
270270
{
271271
_ps->ps = NULL;
@@ -381,7 +381,7 @@ CRT* CResourceManager::_CreateRT(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 Sam
381381
{
382382
CRT* RT = new CRT();
383383
RT->dwFlags |= xr_resource_flagged::RF_REGISTERED;
384-
m_rtargets.insert(mk_pair(RT->set_name(Name), RT));
384+
m_rtargets.insert(std::make_pair(RT->set_name(Name), RT));
385385
if (RDEVICE.b_is_Ready)
386386
RT->create(Name, w, h, f);
387387
return RT;
@@ -516,7 +516,7 @@ CTexture* CResourceManager::_CreateTexture(LPCSTR _Name)
516516
{
517517
CTexture* T = new CTexture();
518518
T->dwFlags |= xr_resource_flagged::RF_REGISTERED;
519-
m_textures.insert(mk_pair(T->set_name(Name), T));
519+
m_textures.insert(std::make_pair(T->set_name(Name), T));
520520
T->Preload();
521521
if (RDEVICE.b_is_Ready && !bDeferredLoad)
522522
T->Load();
@@ -570,7 +570,7 @@ CMatrix* CResourceManager::_CreateMatrix(LPCSTR Name)
570570
CMatrix* M = new CMatrix();
571571
M->dwFlags |= xr_resource_flagged::RF_REGISTERED;
572572
M->dwReference = 1;
573-
m_matrices.insert(mk_pair(M->set_name(Name), M));
573+
m_matrices.insert(std::make_pair(M->set_name(Name), M));
574574
return M;
575575
}
576576
}
@@ -608,7 +608,7 @@ CConstant* CResourceManager::_CreateConstant(LPCSTR Name)
608608
CConstant* C = new CConstant();
609609
C->dwFlags |= xr_resource_flagged::RF_REGISTERED;
610610
C->dwReference = 1;
611-
m_constants.insert(mk_pair(C->set_name(Name), C));
611+
m_constants.insert(std::make_pair(C->set_name(Name), C));
612612
return C;
613613
}
614614
}

src/Layers/xrRender/ShaderResourceTraits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ inline T* CResourceManager::CreateShader(const char* name)
9393
T* sh = new T();
9494

9595
sh->dwFlags |= xr_resource_flagged::RF_REGISTERED;
96-
sh_map.insert(mk_pair(sh->set_name(name), sh));
96+
sh_map.insert(std::make_pair(sh->set_name(name), sh));
9797
if (0 == stricmp(name, "null"))
9898
{
9999
sh->sh = NULL;

src/Layers/xrRender/SkeletonCustom.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ void CKinematics::Load(const char* N, IReader* data, u32 dwFlags)
242242
pBone->name = shared_str(buf);
243243
pBone->child_faces.resize(children.size());
244244
bones->push_back(pBone);
245-
bone_map_N->push_back(mk_pair(pBone->name, ID));
246-
bone_map_P->push_back(mk_pair(pBone->name, ID));
245+
bone_map_N->push_back(std::make_pair(pBone->name, ID));
246+
bone_map_P->push_back(std::make_pair(pBone->name, ID));
247247

248248
// It's parent
249249
data->r_stringZ(buf, sizeof(buf));

src/Layers/xrRender/blenders/Blender_Recorder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void CBlender_Compile::Stage_Texture(LPCSTR name, u32, u32 fmin, u32 fmip, u32 f
319319
xrDebug::Fatal(DEBUG_INFO, "Not enought textures for shader. Base texture: '%s'.", *lst[0]);
320320
N = *lst[id];
321321
}
322-
passTextures.push_back(mk_pair(Stage(), ref_texture(RImplementation.Resources->_CreateTexture(N))));
322+
passTextures.push_back(std::make_pair(Stage(), ref_texture(RImplementation.Resources->_CreateTexture(N))));
323323
// i_Address (Stage(),address);
324324
i_Filter(Stage(), fmin, fmip, fmag);
325325
}

0 commit comments

Comments
 (0)