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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 26 09:47:28 UTC 2020


 basic/source/classes/image.cxx |    3 +--
 basic/source/comp/parser.cxx   |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit da527cd45b9676c9d1d8eb171ecbe55e8b8f9031
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jun 26 08:37:08 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jun 26 11:46:49 2020 +0200

    Upcoming improved loplugin:elidestringvar: basic
    
    Change-Id: Ie5422ac19289693c44ce81548a74bd727bb0be36
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97193
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 038179334595..84878136a756 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -661,8 +661,7 @@ OUString SbiImage::GetString( short nId ) const
             sal_uInt32 nLen = nNextOff - nOff - 1;
             if( nLen == 1 )
             {
-                OUString aNullCharStr( u'\0');
-                return aNullCharStr;
+                return OUString( u'\0');
             }
         }
         else
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 72dc9217f6fc..6819c3ae588d 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -857,8 +857,7 @@ void SbiParser::AddConstants()
     addStringConst( aPublics, "vbTab", "\x09" );
     addStringConst( aPublics, "vbVerticalTab", "\x0B" );
 
-    OUString aNullCharStr(u'\0');
-    addStringConst( aPublics, "vbNullChar", aNullCharStr );
+    addStringConst( aPublics, "vbNullChar", OUString(u'\0') );
 }
 
 // ERROR n


More information about the Libreoffice-commits mailing list