1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Use std::swap

This commit is contained in:
2014-07-22 22:34:43 -07:00
parent 72f18e8ebb
commit 1a987173d6
5 changed files with 6 additions and 42 deletions

View File

@ -212,27 +212,6 @@ inline double hsSwapEndianDouble(double dvalue)
#define hsToLEDouble(n) hsSwapEndianDouble(n)
#endif
inline void hsSwap(int32_t& a, int32_t& b)
{
int32_t c = a;
a = b;
b = c;
}
inline void hsSwap(uint32_t& a, uint32_t& b)
{
uint32_t c = a;
a = b;
b = c;
}
inline void hsSwap(float& a, float& b)
{
float c = a;
a = b;
b = c;
}
//===========================================================================
// Define a NOOP (null) statement
//===========================================================================
@ -242,21 +221,6 @@ inline void hsSwap(float& a, float& b)
# define NULL_STMT ((void)0)
#endif
/****************************************************************************
*
* SWAP
* Swaps the values of two variables
*
***/
//===========================================================================
template<class T>
void SWAP (T & a, T & b) {
T temp = a;
a = b;
b = temp;
}
/****************************************************************************
*