diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-23 13:29:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 08:06:10 +0200 |
commit | 0e6a2601b39cbadaff7f7506ba9e804f108060db (patch) | |
tree | ffd6bb4970f689d20087b721eb8dfd4bc86cd53f /ucb/source/ucp/package/pkguri.cxx | |
parent | 457b349edbaf6d9dc747f3a631fee70e0c035bae (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/package/pkguri.cxx')
-rw-r--r-- | ucb/source/ucp/package/pkguri.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx index 29e9cd61c404..62300681b218 100644 --- a/ucb/source/ucp/package/pkguri.cxx +++ b/ucb/source/ucp/package/pkguri.cxx @@ -81,14 +81,11 @@ void PackageUri::init() const } // Scheme must be followed by '://' - if ( ( m_aUri.getStr()[ PACKAGE_URL_SCHEME_LENGTH ] - != sal_Unicode( ':' ) ) + if ( ( m_aUri[ PACKAGE_URL_SCHEME_LENGTH ] != ':' ) || - ( m_aUri.getStr()[ PACKAGE_URL_SCHEME_LENGTH + 1 ] - != sal_Unicode( '/' ) ) + ( m_aUri[ PACKAGE_URL_SCHEME_LENGTH + 1 ] != '/' ) || - ( m_aUri.getStr()[ PACKAGE_URL_SCHEME_LENGTH + 2 ] - != sal_Unicode( '/' ) ) ) + ( m_aUri[ PACKAGE_URL_SCHEME_LENGTH + 2 ] != '/' ) ) { // error, but remember that we did a init(). m_aPath = OUString( "/" ); @@ -135,8 +132,7 @@ void PackageUri::init() const } else if ( nEnd == ( aPureUri.getLength() - 1 ) ) { - if ( aPureUri.getStr()[ aPureUri.getLength() - 2 ] - == sal_Unicode( '/' ) ) + if ( aPureUri[ aPureUri.getLength() - 2 ] == '/' ) { // Only <scheme>://// or <scheme>://<something>// |