From 0e6a2601b39cbadaff7f7506ba9e804f108060db Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 23 Oct 2013 13:29:32 +0200 Subject: 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 --- cppuhelper/source/unourl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cppuhelper') diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx index c5981f9a4264..a9aa133f7fdc 100644 --- a/cppuhelper/source/unourl.cxx +++ b/cppuhelper/source/unourl.cxx @@ -72,7 +72,7 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor) for (sal_Int32 i = 0;; ++i) { bool bEnd = i == rDescriptor.getLength(); - sal_Unicode c = bEnd ? 0 : rDescriptor.getStr()[i]; + sal_Unicode c = bEnd ? 0 : rDescriptor[i]; switch (eState) { case STATE_NAME0: @@ -236,7 +236,7 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl) rtl::OUString("UNO URL contains empty ObjectName")); for (j = i; j < rUrl.getLength(); ++j) { - sal_Unicode c = rUrl.getStr()[j]; + sal_Unicode c = rUrl[j]; if (!isAlphanum(c) && c != 0x21 && c != 0x24 // '!', '$' && c != 0x26 && c != 0x27 && c != 0x28 // '&', ''', '(' && c != 0x28 && c != 0x2A && c != 0x2B // ')', '*', '+' -- cgit