[Libreoffice-commits] core.git: codemaker/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue May 18 06:29:54 UTC 2021


 codemaker/source/codemaker/global.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2b3879c748adb8d48606339cecaf81a12c19f697
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon May 17 17:39:17 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue May 18 08:29:18 2021 +0200

    Use implicit conversion from OStringBuffer to std::string_view
    
    ...instead of going via raw `char const *`.  (This changes the code's semantics
    if buffer can contain embedded NULs, but it is unlikely that the original code
    using getStr() was even meant to stop comparison at the first embedded NUL.)
    
    Change-Id: I00a0a08b3ba8c318e3b898548ef185efa3f93ef2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115713
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index e302d7c7742c..1b2b11db0f7e 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -119,7 +119,7 @@ OString createFileNameFromType( const OString& destination,
         if( nIndex == -1 )
             break;
 
-        if (buffer.isEmpty() || std::string_view(".") == buffer.getStr())
+        if (buffer.isEmpty() || std::string_view(".") == buffer)
         {
             buffer.append(token);
             continue;


More information about the Libreoffice-commits mailing list