diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2018-12-16 00:44:18 +0000 |
---|---|---|
committer | Hein-Pieter van Braam <hp@tmm.cx> | 2018-12-16 16:51:38 +0100 |
commit | 4e25e5066bfd6a1ea9d5dbfa5db9e25b66b8aa02 (patch) | |
tree | 1d774f8ffe2f6321aa22bfe9148ddc24515ae8ba /modules/mono | |
parent | 7ac67bfec106d2ae807e845d0e093c6e0f2c43b5 (diff) |
Reduce String CoW
By introducing an intermediate proxy class for the array subscript
operator for String and CharString we can control better when CowData
will actually CoW.
This should improve performance of String usage for most cases.
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/mono_gd/gd_mono_marshal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp index 3f0a5d6e50..b0b2aec667 100644 --- a/modules/mono/mono_gd/gd_mono_marshal.cpp +++ b/modules/mono/mono_gd/gd_mono_marshal.cpp @@ -216,7 +216,7 @@ String mono_to_utf16_string(MonoString *p_mono_string) { ret.set(len, 0); CharType *src = (CharType *)mono_string_chars(p_mono_string); - CharType *dst = &(ret.operator[](0)); + CharType *dst = ret.ptrw(); for (int i = 0; i < len; i++) { dst[i] = src[i]; |