summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-12-11 17:07:26 +0400
committerMichael Stahl <mstahl@redhat.com>2012-12-11 13:23:14 +0000
commitabca8e3afa1c9c42266e89b863ee69cca4b93e21 (patch)
treecba7a8fb5f69a387e7c8f04a6376bfb34090c5c9 /sal
parente4cdeebc488e41d64cee1ccc531fc04ce727b03c (diff)
use SAL_WARN_UNUSED_RESULT for OUString::replaceAll
Change-Id: I30754e4d0cb0c490e6c125ba034e2e0eac3751e7 Reviewed-on: https://gerrit.libreoffice.org/1297 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/inc/rtl/ustring.hxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index bd1b9cb9f37e..5760914fcc3f 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -1614,7 +1614,9 @@ public:
@since LibreOffice 4.0
*/
- OUString replaceAll(OUString const & from, OUString const & to, sal_Int32 fromIndex = 0) const {
+ SAL_WARN_UNUSED_RESULT OUString replaceAll(
+ OUString const & from, OUString const & to, sal_Int32 fromIndex = 0) const
+ {
rtl_uString * s = 0;
rtl_uString_newReplaceAllFromIndex(&s, pData, from.pData, to.pData, fromIndex);
return OUString(s, SAL_NO_ACQUIRE);
@@ -1634,7 +1636,7 @@ public:
@since LibreOffice 3.6
*/
template< typename T >
- typename internal::ConstCharArrayDetector< T, OUString >::Type replaceAll( T& from, OUString const & to) const
+ SAL_WARN_UNUSED_RESULT typename internal::ConstCharArrayDetector< T, OUString >::Type replaceAll( T& from, OUString const & to) const
{
rtl_uString * s = 0;
assert( strlen( from ) == internal::ConstCharArrayDetector< T >::size - 1 );
@@ -1656,7 +1658,7 @@ public:
@since LibreOffice 3.6
*/
template< typename T1, typename T2 >
- typename internal::ConstCharArrayDetector< T1, typename internal::ConstCharArrayDetector< T2, OUString >::Type >::Type
+ SAL_WARN_UNUSED_RESULT typename internal::ConstCharArrayDetector< T1, typename internal::ConstCharArrayDetector< T2, OUString >::Type >::Type
replaceAll( T1& from, T2& to ) const
{
rtl_uString * s = 0;