Skip to content

Commit

Permalink
Pointed std namespace explicitly when using swap()
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jan 6, 2018
1 parent 82b415c commit 3cf0474
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Layers/xrRender/SkeletonCustom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ void CKinematics::Visibility_Update()
{
// move into invisible list
children_invisible.push_back(children[c_it]);
swap(children[c_it], children.back());
std::swap(children[c_it], children.back());
children.pop_back();
}
}
Expand All @@ -557,7 +557,7 @@ void CKinematics::Visibility_Update()
{
// move into visible list
children.push_back(children_invisible[_it]);
swap(children_invisible[_it], children_invisible.back());
std::swap(children_invisible[_it], children_invisible.back());
children_invisible.pop_back();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_R2/r2_R_sun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ class DumbConvexVolume
_edge(int _p0, int _p1, int m) : p0(_p0), p1(_p1), counter(m)
{
if (p0 > p1)
swap(p0, p1);
std::swap(p0, p1);
}
bool equal(_edge& E) { return p0 == E.p0 && p1 == E.p1; }
};
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_R3/r3_R_sun_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class DumbConvexVolume
_edge(int _p0, int _p1, int m) : p0(_p0), p1(_p1), counter(m)
{
if (p0 > p1)
swap(p0, p1);
std::swap(p0, p1);
}
bool equal(_edge& E) { return p0 == E.p0 && p1 == E.p1; }
};
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_R4/r4_R_sun_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class DumbConvexVolume
_edge(int _p0, int _p1, int m) : p0(_p0), p1(_p1), counter(m)
{
if (p0 > p1)
swap(p0, p1);
std::swap(p0, p1);
}
bool equal(_edge& E) { return p0 == E.p0 && p1 == E.p1; }
};
Expand Down
2 changes: 0 additions & 2 deletions src/xrCore/_stl_extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

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

using std::swap;

#include "xrCommon/predicates.h"

// tamlin: TODO (low priority, for a rainy day): Rename these macros from DEFINE_* to DECLARE_*
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/WeaponMagazinedWGrenade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ void CWeaponMagazinedWGrenade::PerformSwitchGL()

m_ammoTypes.swap(m_ammoTypes2);

swap(m_ammoType, m_ammoType2);
swap(m_DefaultCartridge, m_DefaultCartridge2);
std::swap(m_ammoType, m_ammoType2);
std::swap(m_DefaultCartridge, m_DefaultCartridge2);

m_magazine.swap(m_magazine2);
iAmmoElapsed = (int)m_magazine.size();
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ik/eqn.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static int solve_trig1_aux(float c, float a2b2, float atan2ba, float theta[2])

if (theta[0] > theta[1])
{
swap(theta[0], theta[1]);
std::swap(theta[0], theta[1]);
// temp = theta[0];
// theta[0] = theta[1];
// theta[1] = temp;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/trade2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void CTrade::TransferItem(CInventoryItem* pItem, bool bBuying, bool bFree)
CGameObject* O2 = smart_cast<CGameObject*>(pThis.inv_owner);

if (!bBuying)
swap(O1, O2);
std::swap(O1, O2);

NET_Packet P;
O1->u_EventGen(P, GE_TRADE_SELL, O1->ID());
Expand Down

0 comments on commit 3cf0474

Please sign in to comment.