Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On 03/11/2013 02:10 PM, Chr. Rossmanith wrote:
commit 407b51db1831bb2cf21def88241323e35c612005
Author: Chr. Rossmanith <ChrRossmanith@gmx.de>
Date:   Sun Mar 10 20:44:01 2013 +0100

     Remove RTL_CONSTASCII_STRINGPARAM (unotools)

     Change-Id: I2911e50ddcd007d80498b9d65efd14368ac3baca

diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index 4c7b0e1..a37f6ae 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -72,13 +72,11 @@ namespace utl

      namespace
      {
-        rtl::OUString makeImplName()
+        OUString makeImplName()
          {
-            rtl::OUString uri;
-            rtl::Bootstrap::get(
-                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BRAND_BASE_DIR")),
-                uri);
-            return uri + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/program/" 
BOOTSTRAP_DATA_NAME));
+            OUString uri;
+            rtl::Bootstrap::get( OUString("BRAND_BASE_DIR"), uri);
+            return uri + "/program/" + BOOTSTRAP_DATA_NAME;

For string literals that are concatenated via juxtaposition (as is the case for "/program/" and BOOTSTRAP_DATA_NAME, where the latter is a macro that expands to a string literal), it is arguably better to keep them as such, instead of concatenating them via operator +. It would e.g. fail if they were the first two terms in the whole expression,

  return "/program/" + BOOTSTRAP_DATA_NAME + uri;

Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.