diff options
author | Treeston <treeston.mmoc@gmail.com> | 2018-12-25 12:36:20 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-11-16 21:05:35 +0100 |
commit | 549d5fea316103e503ff3480ca4d789f6a2f5925 (patch) | |
tree | 588079493f1124620c460240e2feaf6e070d15df /src/common/Utilities/Util.cpp | |
parent | 4f8fd5690355a4202e8f29eb175bb782d4417cef (diff) |
Core/Utils: some code style adjustments, 6d6077e follow-up
(cherry picked from commit 4c3af3b636d5e9279fb694c9d9a5a4422ad773d0)
Diffstat (limited to 'src/common/Utilities/Util.cpp')
-rw-r--r-- | src/common/Utilities/Util.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp index 36099263c03..099de72c7af 100644 --- a/src/common/Utilities/Util.cpp +++ b/src/common/Utilities/Util.cpp @@ -251,9 +251,9 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize) { try { - Trinity::BufferWriteGuard<wchar_t> guard(wstr, wsize); - guard = utf8::utf8to16(utf8str, utf8str+csize, guard); - wsize -= guard.size(); // remaining unused space + Trinity::CheckedBufferOutputIterator<wchar_t> out(wstr, wsize); + out = utf8::utf8to16(utf8str, utf8str+csize, out); + wsize -= out.remaining(); // remaining unused space wstr[wsize] = L'\0'; } catch (std::exception const&) |