diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-09 14:02:26 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-09 17:55:16 +0200 |
commit | 81d55a0a8b999c58b5b347abd6214d6571ed9923 (patch) | |
tree | e8ebe2ea54cdb478aeaa9f74a2b8d0b2d9bb21d5 /include/rtl/ustring.hxx | |
parent | 7c8f27e3d8ff9c22409313a093bf538256fa2f7f (diff) |
Revert "prevent using O[U]String::subView on temporaties"
This reverts commit 59059d00c29334414a26bf5452572433f5735489, as it effectively
did nothing, as rvalues can bind to `const &` just fine.
<https://gerrit.libreoffice.org/c/core/+/133747> "Acutally do prevent using
O[U]String::subView on temporaties" would have fixed that, but (a) it didn't
find any actual mis-uses and (b) rather would have required a handful of
legitimate cases to be dressed up with o3tl::temporary now, so is arguably not
worth it.
Change-Id: I923d0db2646dc8ea66d1b2a8b709ee2cd7a60ed4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134058
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/rtl/ustring.hxx')
-rw-r--r-- | include/rtl/ustring.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index b7cebaf90647..e6d3ed682932 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -2191,7 +2191,7 @@ public: @param beginIndex the beginning index, inclusive. @return the specified substring. */ - SAL_WARN_UNUSED_RESULT std::u16string_view subView( sal_Int32 beginIndex ) const & + SAL_WARN_UNUSED_RESULT std::u16string_view subView( sal_Int32 beginIndex ) const { assert(beginIndex >= 0); assert(beginIndex <= getLength()); @@ -2210,7 +2210,7 @@ public: @param count the number of characters. @return the specified substring. */ - SAL_WARN_UNUSED_RESULT std::u16string_view subView( sal_Int32 beginIndex, sal_Int32 count ) const & + SAL_WARN_UNUSED_RESULT std::u16string_view subView( sal_Int32 beginIndex, sal_Int32 count ) const { assert(beginIndex >= 0); assert(count >= 0); |