diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-12-16 19:13:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-16 19:13:35 +0100 |
commit | 9c7bc127b9f719b4fe6a14dd2c8745fc64cf1b32 (patch) | |
tree | 19ef5ec49f3737f9b44485740328d8f1a97085fe /core/compressed_translation.cpp | |
parent | 169db6abdd9d8973822dc5f2a4ce5bcf00bb3f55 (diff) | |
parent | 4e25e5066bfd6a1ea9d5dbfa5db9e25b66b8aa02 (diff) |
Merge pull request #24385 from hpvb/reduce-string-coew
Reduce String CoW
Diffstat (limited to 'core/compressed_translation.cpp')
-rw-r--r-- | core/compressed_translation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp index 7dd5308fab..73affd8fe9 100644 --- a/core/compressed_translation.cpp +++ b/core/compressed_translation.cpp @@ -83,7 +83,7 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) { if (ps.orig_len != 0) { CharString dst_s; dst_s.resize(src_s.size()); - int ret = smaz_compress(src_s.get_data(), src_s.size(), &dst_s[0], src_s.size()); + int ret = smaz_compress(src_s.get_data(), src_s.size(), dst_s.ptrw(), src_s.size()); if (ret >= src_s.size()) { //if compressed is larger than original, just use original ps.orig_len = src_s.size(); |