diff options
author | Noel Grandin <noel@peralex.com> | 2013-12-10 08:31:13 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-12-12 13:15:24 +0200 |
commit | fb847101519ad74c02183672c04ebf1d700aae83 (patch) | |
tree | fa391cb75ed11817804bb4b9fbafa7ee265b8dbe /stoc | |
parent | 1957303363ea9bd308b5781da09beaa09df7420c (diff) |
simplify - use OUString::startsWith where possible
Convert code like
if( !aStr.isEmpty() && aStr[0] == 'x' )
to
if( aStr.startsWith("x") )
Change-Id: Iabc3a44ed3be2d29eed876e0eeef212ccd271edf
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/uriproc/UriReferenceFactory.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx index 903e2c0ffcb5..121c761d5a88 100644 --- a/stoc/source/uriproc/UriReferenceFactory.cxx +++ b/stoc/source/uriproc/UriReferenceFactory.cxx @@ -185,9 +185,7 @@ css::uno::Reference< css::uri::XUriReference > parseGeneric( OUString const & scheme, OUString const & schemeSpecificPart) { bool isAbsolute = !scheme.isEmpty(); - bool isHierarchical - = !isAbsolute - || (!schemeSpecificPart.isEmpty() && schemeSpecificPart[0] == '/'); + bool isHierarchical = !isAbsolute || schemeSpecificPart.startsWith("/"); bool hasAuthority = false; OUString authority; OUString path; |