[Libreoffice-commits] core.git: include/rtl

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 21 20:16:34 UTC 2020


 include/rtl/string.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e79a6a5270d190d6e89a6acf08e22419386d2117
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Sep 21 20:48:56 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Sep 21 22:15:56 2020 +0200

    No need to make the OString(std::string_view) ctor explicit
    
    <https://gerrit.libreoffice.org/c/core/+/101829>
    "Make std::u16string_view -> OUString construction explicit" (which has
    meanwhile been abandoned) had intended to make the OUString(std::u16string_view)
    ctor explicit, mostly not for the rationale given in the commit message there
    (it being "a rather expensive operation"), but rather to avoid anticipated
    ambiguity issues when introducing e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn
    OUStringLiteral into a consteval'ed, static-refcound rtl_uString"---but which
    has ultimately been added in a form that did not give rise to such ambiguity
    issues after all.
    
    4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a
    consteval'ed, static-refcound rtl_String" had added the
    OString(std::string_view) ctor as explicit to match the corresponding explicit
    OUString(std::u16string_view) from the above
    <https://gerrit.libreoffice.org/c/core/+/101829>.  But as that has now been
    abandoned, there is no good reason to keep this ctor explicit, either.
    
    Change-Id: I05742de5f3992ad5995149631bf8d55c8d448387
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103124
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index e59ffba83a62..7086de15c987 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -304,7 +304,7 @@ public:
 #endif
 
 #if defined LIBO_INTERNAL_ONLY
-    explicit OString(std::string_view sv) {
+    OString(std::string_view sv) {
         if (sv.size() > sal_uInt32(std::numeric_limits<sal_Int32>::max())) {
             throw std::bad_alloc();
         }


More information about the Libreoffice-commits mailing list