Mercurial > projects > qtd
comparison qt/core/QList.d @ 330:115130499d78 signals
fix a const violation spotted by a newer dmd, thanks Rainer
author | eldar1@eldar1-laptop |
---|---|
date | Sat, 16 Jan 2010 12:20:50 +0000 |
parents | 7a3c43424dca |
children | 5896535a03cd |
comparison
equal
deleted
inserted
replaced
329:0085380ff921 | 330:115130499d78 |
---|---|
403 | 403 |
404 ref QList!T opAssign(const ref QList!T l) | 404 ref QList!T opAssign(const ref QList!T l) |
405 { | 405 { |
406 // writeln("QList opAssign"); | 406 // writeln("QList opAssign"); |
407 if (d != l.d) { | 407 if (d != l.d) { |
408 l.d.ref_.increment(); | 408 QListData.Data* nd = cast(QListData.Data*)l.d; |
409 nd.ref_.increment(); | |
409 if (!d.ref_.decrement()) | 410 if (!d.ref_.decrement()) |
410 free(d); | 411 free(d); |
411 d = cast(QListData.Data*)l.d; | 412 d = nd; |
412 if (!d.sharable) | 413 if (!d.sharable) |
413 detach_helper(); | 414 detach_helper(); |
414 } | 415 } |
415 return this; | 416 return this; |
416 } | 417 } |