summaryrefslogtreecommitdiff
path: root/cppuhelper/source
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/source')
-rw-r--r--cppuhelper/source/bootstrap.cxx2
-rw-r--r--cppuhelper/source/paths.cxx4
2 files changed, 2 insertions, 4 deletions
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 81d34202db26..6522f722ca62 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -111,7 +111,7 @@ Reference< XComponentContext > SAL_CALL bootstrap()
throw BootstrapException(
"cannot convert soffice installation path to URL!");
}
- if (!path.isEmpty() && path[path.getLength() - 1] != '/') {
+ if (!path.isEmpty() && !path.endsWith("/")) {
path += "/";
}
diff --git a/cppuhelper/source/paths.cxx b/cppuhelper/source/paths.cxx
index 41abeb4ef370..5ff356fa2877 100644
--- a/cppuhelper/source/paths.cxx
+++ b/cppuhelper/source/paths.cxx
@@ -129,9 +129,7 @@ void cppu::decodeRdbUri(rtl::OUString * uri, bool * optional, bool * directory)
if (*optional) {
*uri = uri->copy(1);
}
- *directory = uri->getLength() >= 3 && (*uri)[0] == '<'
- && (*uri)[uri->getLength() - 2] == '>'
- && (*uri)[uri->getLength() - 1] == '*';
+ *directory = uri->startsWith("<") && uri->endsWith(">*");
if (*directory) {
*uri = uri->copy(1, uri->getLength() - 3);
}