Lines 1-6
Link Here
|
1 |
--- src/LocationList.h.orig 2010-05-11 12:50:34.000000000 +0400 |
1 |
--- src/LocationList.h.orig 2010-05-11 08:50:34 UTC |
2 |
+++ src/LocationList.h 2014-05-21 17:17:08.650652359 +0400 |
2 |
+++ src/LocationList.h |
3 |
@@ -55,7 +55,7 @@ |
3 |
@@ -55,7 +55,7 @@ template<class T> class LocationList : p |
4 |
|
4 |
|
5 |
void add(T t) |
5 |
void add(T t) |
6 |
{ |
6 |
{ |
Lines 9-23
Link Here
|
9 |
d_id[t->getId()] = t; |
9 |
d_id[t->getId()] = t; |
10 |
int size = t->getSize(); |
10 |
int size = t->getSize(); |
11 |
for (int i = 0; i < size; i++) |
11 |
for (int i = 0; i < size; i++) |
12 |
@@ -74,8 +74,9 @@ |
12 |
@@ -74,8 +74,14 @@ |
13 |
for (int j = 0; j < size; j++) |
13 |
for (int j = 0; j < size; j++) |
14 |
{ |
14 |
{ |
15 |
Vector<int> pos = t->getPos() + Vector<int>(i,j); |
15 |
Vector<int> pos = t->getPos() + Vector<int>(i,j); |
16 |
- if (d_object.find(pos) != d_object.end()) |
16 |
+#if defined(_LIBCPP_VERSION) |
17 |
- d_object.erase(d_object.find(pos)); |
|
|
18 |
+ typename PositionMap::const_iterator it = d_object.find(pos); |
17 |
+ typename PositionMap::const_iterator it = d_object.find(pos); |
19 |
+ if (it != d_object.end()) |
18 |
+ if (it != d_object.end()) |
20 |
+ d_object.erase(it); |
19 |
+ d_object.erase(it); |
|
|
20 |
+#else |
21 |
if (d_object.find(pos) != d_object.end()) |
22 |
d_object.erase(d_object.find(pos)); |
23 |
+#endif |
21 |
} |
24 |
} |
22 |
delete t; |
25 |
delete t; |
23 |
} |
26 |
} |