summaryrefslogtreecommitdiff
path: root/include/rtl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-11-06 13:53:59 +0100
committerMichael Stahl <mstahl@redhat.com>2013-11-07 01:34:35 +0100
commitb5aa7f71e6aa4440d5a7bb3cd35a34d35c81f970 (patch)
tree6d239bfd03b32035c77341b672e353d98fa62e2c /include/rtl
parent5effaa90f38d55f035d381ad8982d2ed6b9d46de (diff)
OString::operator[]: make this consistent with OUString
Change-Id: If63362aba058bbcc0cc6bb1fae1c76005f1291d4
Diffstat (limited to 'include/rtl')
-rw-r--r--include/rtl/string.hxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 3a338fd8d05e..e5ac7d6821d7 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -362,11 +362,7 @@ public:
@since LibreOffice 3.5
*/
sal_Char operator [](sal_Int32 index) const {
- assert(index >= 0 && index <= getLength());
- //TODO: should really check for < getLength(), but there is quite
- // some clever code out there that violates this function's
- // documented precondition and relies on s[s.getLength()] == 0 and
- // that would need to be fixed first
+ assert(index >= 0 && index < getLength());
return getStr()[index];
}