aboutsummaryrefslogtreecommitdiff
path: root/net/ktorrent/files/patch-libtorrent-chunkmanager.cpp
blob: 0ff4cec92e7cee8c5bb748579bcb4c8b8399bc92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- libtorrent/chunkmanager.cpp.orig	Mon Oct 10 20:06:38 2005
+++ libtorrent/chunkmanager.cpp	Mon Oct 10 20:10:53 2005
@@ -315,8 +315,11 @@
 
 	void ChunkManager::prioritise(Uint32 from,Uint32 to)
 	{
-		if (from > to)
-			std::swap(from,to);
+		if (from > to) {
+			Uint32 tmp = from;
+			from = to;
+			to = tmp;
+		}
 
 		Uint32 i = from;
 		while (i <= to && i < chunks.count())
@@ -329,8 +332,11 @@
 
 	void ChunkManager::exclude(Uint32 from,Uint32 to)
 	{
-		if (from > to)
-			std::swap(from,to);
+		if (from > to) {
+			Uint32 tmp = from;
+			from = to;
+			to = tmp;
+		}
 
 		Uint32 i = from;
 		while (i <= to && i < chunks.count())
@@ -347,8 +353,11 @@
 
 	void ChunkManager::include(Uint32 from,Uint32 to)
 	{
-		if (from > to)
-			std::swap(from,to);
+		if (from > to) {
+			Uint32 tmp = from;
+			from = to;
+			to = tmp;
+		}
 
 		Uint32 i = from;
 		while (i <= to && i < chunks.count())