Mercurial > projects > qtd
comparison d2/qt/core/QList.d @ 402:e67ce7c21758
gdc & 64 bit changes
author | Eldar Insafutdinov |
---|---|
date | Thu, 17 Mar 2011 19:45:42 +0000 |
parents | a032df77b6ab |
children |
comparison
equal
deleted
inserted
replaced
395:d757b8b1ca75 | 402:e67ce7c21758 |
---|---|
83 | 83 |
84 private int grow(int size) | 84 private int grow(int size) |
85 { | 85 { |
86 // dear compiler: don't optimize me out. | 86 // dear compiler: don't optimize me out. |
87 // synchronized { | 87 // synchronized { |
88 int x = qAllocMore(size * (void*).sizeof, QListData.DataHeaderSize) / (void*).sizeof; | 88 int x = cast(int) (qAllocMore(cast(int)(size * (void*).sizeof), QListData.DataHeaderSize) / (void*).sizeof); |
89 return x; | 89 return x; |
90 // } | 90 // } |
91 } | 91 } |
92 | 92 |
93 struct QListData { | 93 struct QListData { |
301 } | 301 } |
302 | 302 |
303 void **erase(void **xi) | 303 void **erase(void **xi) |
304 { | 304 { |
305 // Q_ASSERT(d.ref_ == 1); | 305 // Q_ASSERT(d.ref_ == 1); |
306 int i = xi - (d.array.ptr + d.begin); | 306 int i = cast(int)(xi - (d.array.ptr + d.begin)); |
307 remove(i); | 307 remove(i); |
308 return d.array.ptr + d.begin + i; | 308 return d.array.ptr + d.begin + i; |
309 } | 309 } |
310 | 310 |
311 int size() const { return d.end - d.begin; } | 311 int size() const { return d.end - d.begin; } |