diff options
| author | Eugen Wissner <belka@caraus.de> | 2017-05-29 11:41:49 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2017-05-29 11:41:49 +0200 |
| commit | 6c0588164a242e4f538e4d0cfd72dd0f5a469c43 (patch) | |
| tree | b44a9d555085b7e748820af0f41dbf3204b29e5f /source | |
| parent | 8ee1d647ce31748f12e3e57d2c21a1bcbd7e1fa9 (diff) | |
| download | tanya-6c0588164a242e4f538e4d0cfd72dd0f5a469c43.tar.gz | |
Rename String.toString back to get()
Since it is expected that the return type of toString() is
immutable(char)[] and not char[] or const(char)[].
Diffstat (limited to 'source')
| -rw-r--r-- | source/tanya/container/array.d | 2 | ||||
| -rw-r--r-- | source/tanya/container/set.d | 3 | ||||
| -rw-r--r-- | source/tanya/container/string.d | 7 |
3 files changed, 5 insertions, 7 deletions
diff --git a/source/tanya/container/array.d b/source/tanya/container/array.d index 9a2fdd5..472b376 100644 --- a/source/tanya/container/array.d +++ b/source/tanya/container/array.d @@ -160,7 +160,7 @@ struct Range(E) return typeof(return)(*this.container, this.begin + i, this.begin + j); } - inout(E[]) get() inout @trusted + inout(E)[] get() inout @trusted { return this.begin[0 .. length]; } diff --git a/source/tanya/container/set.d b/source/tanya/container/set.d index fc18992..f26e679 100644 --- a/source/tanya/container/set.d +++ b/source/tanya/container/set.d @@ -27,6 +27,9 @@ import tanya.memory; */ struct Range(E) { + private alias ContainerType = CopyConstness!(E, Array!(Bucket!(Unqual!E))); + private ContainerType* container; + @disable this(); @property Range save() diff --git a/source/tanya/container/string.d b/source/tanya/container/string.d index 564a84c..7e50458 100644 --- a/source/tanya/container/string.d +++ b/source/tanya/container/string.d @@ -199,12 +199,7 @@ struct ByCodeUnit(E) return typeof(return)(*this.container, this.begin + i, this.begin + j); } - const(E)[] toString() const @trusted - { - return this.begin[0 .. length]; - } - - E[] toString() @trusted + inout(E)[] get() inout @trusted { return this.begin[0 .. length]; } |
