Skip to content

Commit 3cf0474

Browse files
committed
Pointed std namespace explicitly when using swap()
1 parent 82b415c commit 3cf0474

File tree

8 files changed

+9
-11
lines changed

8 files changed

+9
-11
lines changed

src/Layers/xrRender/SkeletonCustom.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ void CKinematics::Visibility_Update()
543543
{
544544
// move into invisible list
545545
children_invisible.push_back(children[c_it]);
546-
swap(children[c_it], children.back());
546+
std::swap(children[c_it], children.back());
547547
children.pop_back();
548548
}
549549
}
@@ -557,7 +557,7 @@ void CKinematics::Visibility_Update()
557557
{
558558
// move into visible list
559559
children.push_back(children_invisible[_it]);
560-
swap(children_invisible[_it], children_invisible.back());
560+
std::swap(children_invisible[_it], children_invisible.back());
561561
children_invisible.pop_back();
562562
}
563563
}

src/Layers/xrRenderPC_R2/r2_R_sun.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ class DumbConvexVolume
487487
_edge(int _p0, int _p1, int m) : p0(_p0), p1(_p1), counter(m)
488488
{
489489
if (p0 > p1)
490-
swap(p0, p1);
490+
std::swap(p0, p1);
491491
}
492492
bool equal(_edge& E) { return p0 == E.p0 && p1 == E.p1; }
493493
};

src/Layers/xrRenderPC_R3/r3_R_sun_support.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class DumbConvexVolume
297297
_edge(int _p0, int _p1, int m) : p0(_p0), p1(_p1), counter(m)
298298
{
299299
if (p0 > p1)
300-
swap(p0, p1);
300+
std::swap(p0, p1);
301301
}
302302
bool equal(_edge& E) { return p0 == E.p0 && p1 == E.p1; }
303303
};

src/Layers/xrRenderPC_R4/r4_R_sun_support.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class DumbConvexVolume
297297
_edge(int _p0, int _p1, int m) : p0(_p0), p1(_p1), counter(m)
298298
{
299299
if (p0 > p1)
300-
swap(p0, p1);
300+
std::swap(p0, p1);
301301
}
302302
bool equal(_edge& E) { return p0 == E.p0 && p1 == E.p1; }
303303
};

src/xrCore/_stl_extensions.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
#pragma todo("tamlin: This header includes pretty much every std collection there are. Compiler-hog! FIX!")
2525

26-
using std::swap;
27-
2826
#include "xrCommon/predicates.h"
2927

3028
// tamlin: TODO (low priority, for a rainy day): Rename these macros from DEFINE_* to DECLARE_*

src/xrGame/WeaponMagazinedWGrenade.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ void CWeaponMagazinedWGrenade::PerformSwitchGL()
173173

174174
m_ammoTypes.swap(m_ammoTypes2);
175175

176-
swap(m_ammoType, m_ammoType2);
177-
swap(m_DefaultCartridge, m_DefaultCartridge2);
176+
std::swap(m_ammoType, m_ammoType2);
177+
std::swap(m_DefaultCartridge, m_DefaultCartridge2);
178178

179179
m_magazine.swap(m_magazine2);
180180
iAmmoElapsed = (int)m_magazine.size();

src/xrGame/ik/eqn.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static int solve_trig1_aux(float c, float a2b2, float atan2ba, float theta[2])
7474

7575
if (theta[0] > theta[1])
7676
{
77-
swap(theta[0], theta[1]);
77+
std::swap(theta[0], theta[1]);
7878
// temp = theta[0];
7979
// theta[0] = theta[1];
8080
// theta[1] = temp;

src/xrGame/trade2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void CTrade::TransferItem(CInventoryItem* pItem, bool bBuying, bool bFree)
8484
CGameObject* O2 = smart_cast<CGameObject*>(pThis.inv_owner);
8585

8686
if (!bBuying)
87-
swap(O1, O2);
87+
std::swap(O1, O2);
8888

8989
NET_Packet P;
9090
O1->u_EventGen(P, GE_TRADE_SELL, O1->ID());

0 commit comments

Comments
 (0)