Mercurial > projects > ldc
comparison dmd/array.c @ 1183:df386fd4030e
Commit requested by lindquist.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Tue, 31 Mar 2009 03:06:19 +0200 |
parents | b30fe7e1dbb9 |
children |
comparison
equal
deleted
inserted
replaced
1182:5e8f7ad442ba | 1183:df386fd4030e |
---|---|
145 insert(dim, a); | 145 insert(dim, a); |
146 } | 146 } |
147 | 147 |
148 void Array::remove(unsigned i) | 148 void Array::remove(unsigned i) |
149 { | 149 { |
150 memmove(data + i, data + i + 1, (dim - i) * sizeof(data[0])); | 150 memmove(data + i, data + i + 1, (dim - i - 1) * sizeof(data[0])); |
151 dim--; | 151 dim--; |
152 } | 152 } |
153 | 153 |
154 char *Array::toChars() | 154 char *Array::toChars() |
155 { | 155 { |