mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
3217e1c5c3
svn path=/nixpkgs/trunk/; revision=32171
39 lines
1.0 KiB
Diff
39 lines
1.0 KiB
Diff
Origin: OpenSUSE
|
|
Index: djview-4.8/src/qdjvuwidget.cpp
|
|
===================================================================
|
|
--- djview-4.8.orig/src/qdjvuwidget.cpp
|
|
+++ djview-4.8/src/qdjvuwidget.cpp
|
|
@@ -153,7 +153,7 @@ all_numbers(const char *s)
|
|
}
|
|
|
|
template<class T> static inline void
|
|
-swap(T& x, T& y)
|
|
+myswap(T& x, T& y)
|
|
{
|
|
T tmp;
|
|
tmp = x;
|
|
@@ -173,11 +173,11 @@ ksmallest(T *v, int n, int k)
|
|
/* Sort v[lo], v[m], v[hi] by insertion */
|
|
m = (lo+hi)/2;
|
|
if (v[lo]>v[m])
|
|
- swap(v[lo],v[m]);
|
|
+ myswap(v[lo],v[m]);
|
|
if (v[m]>v[hi]) {
|
|
- swap(v[m],v[hi]);
|
|
+ myswap(v[m],v[hi]);
|
|
if (v[lo]>v[m])
|
|
- swap(v[lo],v[m]);
|
|
+ myswap(v[lo],v[m]);
|
|
}
|
|
/* Extract pivot, place sentinel */
|
|
pivot = v[m];
|
|
@@ -191,7 +191,7 @@ ksmallest(T *v, int n, int k)
|
|
do ++l; while (v[l]<pivot);
|
|
do --h; while (v[h]>pivot);
|
|
if (l < h) {
|
|
- swap(v[l],v[h]);
|
|
+ myswap(v[l],v[h]);
|
|
goto loop;
|
|
}
|
|
/* Finish up */
|