diff options
| author | Eugen Wissner <belka@caraus.de> | 2017-05-12 20:35:16 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2017-05-12 20:35:16 +0200 |
| commit | 001c7c3e3399eab1dd89b0d4e52b435e3e4fff8a (patch) | |
| tree | 7c827d7fa3481aeb2574aada1857b317ccc15cfb /source | |
| parent | d4ab339feb1dd2ad23b374d44ba9c031ac80cdd6 (diff) | |
| download | tanya-001c7c3e3399eab1dd89b0d4e52b435e3e4fff8a.tar.gz | |
Replace immutable with const in Vector
Diffstat (limited to 'source')
| -rw-r--r-- | source/tanya/container/vector.d | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/tanya/container/vector.d b/source/tanya/container/vector.d index a7298f1..969720e 100644 --- a/source/tanya/container/vector.d +++ b/source/tanya/container/vector.d @@ -483,7 +483,7 @@ struct Vector(T) return; } bool overflow; - immutable byteSize = mulu(size, T.sizeof, overflow); + const byteSize = mulu(size, T.sizeof, overflow); assert(!overflow); void[] buf = this.data[0 .. this.capacity_]; @@ -540,7 +540,7 @@ struct Vector(T) { return; } - immutable n = max(length, size); + const n = max(length, size); void[] buf = this.data[0 .. this.capacity_]; if (allocator.reallocateInPlace(buf, n * T.sizeof)) { @@ -606,7 +606,7 @@ struct Vector(T) } body { - immutable toRemove = min(howMany, length); + const toRemove = min(howMany, length); length = length - toRemove; @@ -797,9 +797,9 @@ struct Vector(T) } body { - immutable oldLen = length; - immutable offset = r.end - this.data; - immutable inserted = insertBack(el); + const oldLen = length; + const offset = r.end - this.data; + const inserted = insertBack(el); bringToFront(this.data[offset .. oldLen], this.data[oldLen .. length]); return inserted; } @@ -828,8 +828,8 @@ struct Vector(T) } body { - immutable oldLen = length; - immutable offset = r.end - this.data; + const oldLen = length; + const offset = r.end - this.data; static if (__traits(isRef, el)) { @@ -884,8 +884,8 @@ struct Vector(T) } body { - immutable oldLen = length; - immutable offset = r.begin - this.data; + const oldLen = length; + const offset = r.begin - this.data; static if (__traits(isRef, el)) { |
