piSwap
This commit is contained in:
@@ -199,7 +199,7 @@ public:
|
|||||||
PIHash<Key, T> & clear() {pih_content.clear(); return *this;}
|
PIHash<Key, T> & clear() {pih_content.clear(); return *this;}
|
||||||
|
|
||||||
void swap(PIHash<Key, T> & other) {
|
void swap(PIHash<Key, T> & other) {
|
||||||
piSwapBinary<PIVector<PIVector<HashEntry> > >(pih_content, other.pih_content);
|
pih_content.swap(other.pih_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
PIHash<Key, T> & insert(const Key & key, const T & value) {
|
PIHash<Key, T> & insert(const Key & key, const T & value) {
|
||||||
|
|||||||
@@ -128,7 +128,6 @@ inline float randomu() {return float(random()) / RAND_MAX;}
|
|||||||
|
|
||||||
inline const QSizeF operator *(const QSizeF & f, const QSizeF & s) {return QSizeF(f.width() * s.width(), f.height() * s.height());}
|
inline const QSizeF operator *(const QSizeF & f, const QSizeF & s) {return QSizeF(f.width() * s.width(), f.height() * s.height());}
|
||||||
#ifndef PIP_VERSION
|
#ifndef PIP_VERSION
|
||||||
template<typename Type> inline void piSwap(Type & f, Type & s) {Type t = f; f = s; s = t;}
|
|
||||||
template<typename Type> inline Type piMin(const Type & f, const Type & s) {return (f > s) ? s : f;}
|
template<typename Type> inline Type piMin(const Type & f, const Type & s) {return (f > s) ? s : f;}
|
||||||
template<typename Type> inline Type piMin(const Type & f, const Type & s, const Type & t) {return (f < s && f < t) ? f : ((s < t) ? s : t);}
|
template<typename Type> inline Type piMin(const Type & f, const Type & s, const Type & t) {return (f < s && f < t) ? f : ((s < t) ? s : t);}
|
||||||
template<typename Type> inline Type piMax(const Type & f, const Type & s) {return (f < s) ? s : f;}
|
template<typename Type> inline Type piMax(const Type & f, const Type & s) {return (f < s) ? s : f;}
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ inline float randomu() {return float(random()) / RAND_MAX;}
|
|||||||
|
|
||||||
inline const QSizeF operator *(const QSizeF & f, const QSizeF & s) {return QSizeF(f.width() * s.width(), f.height() * s.height());}
|
inline const QSizeF operator *(const QSizeF & f, const QSizeF & s) {return QSizeF(f.width() * s.width(), f.height() * s.height());}
|
||||||
#ifndef PIP_VERSION
|
#ifndef PIP_VERSION
|
||||||
template<typename Type> inline void piSwap(Type & f, Type & s) {Type t = f; f = s; s = t;}
|
|
||||||
template<typename Type> inline Type piMin(const Type & f, const Type & s) {return (f > s) ? s : f;}
|
template<typename Type> inline Type piMin(const Type & f, const Type & s) {return (f > s) ? s : f;}
|
||||||
template<typename Type> inline Type piMin(const Type & f, const Type & s, const Type & t) {return (f < s && f < t) ? f : ((s < t) ? s : t);}
|
template<typename Type> inline Type piMin(const Type & f, const Type & s, const Type & t) {return (f < s && f < t) ? f : ((s < t) ? s : t);}
|
||||||
template<typename Type> inline Type piMax(const Type & f, const Type & s) {return (f < s) ? s : f;}
|
template<typename Type> inline Type piMax(const Type & f, const Type & s) {return (f < s) ? s : f;}
|
||||||
|
|||||||
Reference in New Issue
Block a user