summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/ext
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-23 13:29:32 +0200
committerNoel Grandin <noel@peralex.com>2013-11-04 08:06:10 +0200
commit0e6a2601b39cbadaff7f7506ba9e804f108060db (patch)
treeffd6bb4970f689d20087b721eb8dfd4bc86cd53f /ucb/source/ucp/ext
parent457b349edbaf6d9dc747f3a631fee70e0c035bae (diff)
Convert code that calls OUString::getStr()[] to use the [] operator
This also means that this code now gets bounds checked in debug builds. Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
Diffstat (limited to 'ucb/source/ucp/ext')
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx6
-rw-r--r--ucb/source/ucp/ext/ucpext_datasupplier.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index 4ce4bf641021..37cbddf1c309 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -106,8 +106,8 @@ namespace ucb { namespace ucp { namespace ext
ENSURE_OR_RETURN( !i_rBaseURL.isEmpty(), "illegal base URL", i_rRelativeURL );
OUStringBuffer aComposer( i_rBaseURL );
- if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' )
- aComposer.append( sal_Unicode( '/' ) );
+ if ( !i_rBaseURL.endsWith("/") )
+ aComposer.append( '/' );
aComposer.append( i_rRelativeURL );
return aComposer.makeStringAndClear();
}
@@ -368,7 +368,7 @@ namespace ucb { namespace ucp { namespace ext
break;
}
- if ( sRelativeURL.getStr()[ sRelativeURL.getLength() - 1 ] == '/' )
+ if ( sRelativeURL.endsWith("/") )
sRelativeURL = sRelativeURL.copy( 0, sRelativeURL.getLength() - 1 );
// remove the last segment
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index 20a73c80ae47..57704ff666b7 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -113,8 +113,8 @@ namespace ucb { namespace ucp { namespace ext
ENSURE_OR_RETURN( !i_rBaseURL.isEmpty(), "illegal base URL", i_rRelativeURL );
OUStringBuffer aComposer( i_rBaseURL );
- if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' )
- aComposer.append( sal_Unicode( '/' ) );
+ if ( !i_rBaseURL.endsWith("/") )
+ aComposer.append( '/' );
aComposer.append( i_rRelativeURL );
return aComposer.makeStringAndClear();
}