summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-24 20:32:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-24 22:11:15 +0200
commite0adee8341e89d478511d7b3e784941f2fd9b504 (patch)
tree5be8c2d39197a61142a1265c94e07e4d73cd334f /sal
parent715e7370a160bd3a51bf5aefdd92319da239bc4e (diff)
loplugin:returnconstval in sal..sc
Change-Id: I300d14d580d450ec338129918955651b9d40d5d2 Reviewed-on: https://gerrit.libreoffice.org/78059 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file_path_helper.cxx17
-rw-r--r--sal/qa/rtl/doublelock/rtl_doublelocking.cxx2
2 files changed, 8 insertions, 11 deletions
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index 584279cff841..a89e00bf76ed 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -28,14 +28,11 @@ const sal_Unicode FPH_CHAR_PATH_SEPARATOR = '/';
const sal_Unicode FPH_CHAR_DOT = '.';
const sal_Unicode FPH_CHAR_COLON = ':';
-static const OUString FPH_PATH_SEPARATOR()
-{ return OUString(FPH_CHAR_PATH_SEPARATOR); }
+static const OUStringLiteral FPH_PATH_SEPARATOR("/");
-static const OUString FPH_LOCAL_DIR_ENTRY()
-{ return OUString(FPH_CHAR_DOT); }
+static const OUStringLiteral FPH_LOCAL_DIR_ENTRY(".");
-static const OUString FPH_PARENT_DIR_ENTRY()
-{ return ".."; }
+static const OUStringLiteral FPH_PARENT_DIR_ENTRY("..");
void osl_systemPathRemoveSeparator(rtl_uString* pustrPath)
{
@@ -68,11 +65,11 @@ void osl_systemPathEnsureSeparator(rtl_uString** ppustrPath)
if ((lp > 1 && i != (lp - 1)) || ((lp < 2) && i < 0))
{
- path += FPH_PATH_SEPARATOR();
+ path += FPH_PATH_SEPARATOR;
rtl_uString_assign(ppustrPath, path.pData);
}
- SAL_WARN_IF( !path.endsWith(FPH_PATH_SEPARATOR()),
+ SAL_WARN_IF( !path.endsWith(FPH_PATH_SEPARATOR),
"sal.osl",
"osl_systemPathEnsureSeparator: Post condition failed");
}
@@ -147,8 +144,8 @@ bool osl_systemPathIsLocalOrParentDirectoryEntry(
osl_systemPathGetFileNameOrLastDirectoryPart(pustrPath, &dirent.pData);
- return (dirent == FPH_LOCAL_DIR_ENTRY() ||
- dirent == FPH_PARENT_DIR_ENTRY());
+ return (dirent == FPH_LOCAL_DIR_ENTRY ||
+ dirent == FPH_PARENT_DIR_ENTRY);
}
/** Simple iterator for a path list separated by the specified character
diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
index 384b8f59392a..d2e094d19c12 100644
--- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
+++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
@@ -46,7 +46,7 @@
namespace {
struct Gregorian : public rtl::StaticWithInit<OUString, Gregorian> {
- const OUString operator () () {
+ OUString operator () () {
return CONST_TEST_STRING;
}
};