diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 13:21:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 17:16:29 +0200 |
commit | e6ca379bcbe7d9fb426cf8944f24e345e8856d3f (patch) | |
tree | 436bcc35620174f2a44ead359b1e8cae7f7b0056 /include/rtl/ustring.hxx | |
parent | 7cb283cf0e92cba4bd53b1cd69816ac7037937e4 (diff) |
Clean up some C++20 TODOs
Change-Id: I8baece4349683c7a83a283b85e24f33874b47ba3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158177
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/rtl/ustring.hxx')
-rw-r--r-- | include/rtl/ustring.hxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index cd23f121e2ac..cad8cc10ac48 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -96,10 +96,7 @@ public: OUStringLiteral(char16_t const (&literal)[N]) { assertLayout(); assert(literal[N - 1] == '\0'); - //TODO: Use C++20 constexpr std::copy_n (P0202R3): - for (std::size_t i = 0; i != N; ++i) { - more.buffer[i] = literal[i]; - } + std::copy_n(literal, N, more.buffer); } constexpr sal_Int32 getLength() const { return more.length; } @@ -123,7 +120,7 @@ private: oslInterlockedCount refCount = 0x40000000; // SAL_STRING_STATIC_FLAG (sal/rtl/strimp.hxx) sal_Int32 length = N - 1; - sal_Unicode buffer[N] = {}; //TODO: drop initialization for C++20 (P1331R2) + sal_Unicode buffer[N]; }; public: |