diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-12-08 13:39:35 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-12-08 17:18:38 +0100 |
commit | 2e83a62f15b564edfe7f585dd72fcb41058120b3 (patch) | |
tree | b43e06c3a7867251813d876b5be32be3e7c32ebd /include/rtl | |
parent | 7ce84d71b5a7e46bc4322997b1727b260e9b2cbd (diff) |
Clean up LIBO_INTERNAL_ONLY uses of SAL_WARN_UNUSED_RESULT
Change-Id: I98b2d90c8345f07010f6defd82557188d5cd35c7
Reviewed-on: https://gerrit.libreoffice.org/64808
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/rtl')
-rw-r--r-- | include/rtl/stringconcat.hxx | 16 | ||||
-rw-r--r-- | include/rtl/ustring.hxx | 48 |
2 files changed, 32 insertions, 32 deletions
diff --git a/include/rtl/stringconcat.hxx b/include/rtl/stringconcat.hxx index f1c1ca8b5e6e..220d0a2cfc9e 100644 --- a/include/rtl/stringconcat.hxx +++ b/include/rtl/stringconcat.hxx @@ -221,7 +221,7 @@ struct ToStringHelper< OUStringConcat< T1, T2 > > }; template< typename T1, typename T2 > -SAL_WARN_UNUSED_RESULT +[[nodiscard]] inline typename libreoffice_internal::Enable< OStringConcat< T1, T2 >, ToStringHelper< T1 >::allowOStringConcat && ToStringHelper< T2 >::allowOStringConcat >::Type operator+( const T1& left, const T2& right ) { @@ -230,7 +230,7 @@ typename libreoffice_internal::Enable< OStringConcat< T1, T2 >, ToStringHelper< // char[N] and const char[N] need to be done explicitly, otherwise the compiler likes to treat them the same way for some reason template< typename T, int N > -SAL_WARN_UNUSED_RESULT +[[nodiscard]] inline typename libreoffice_internal::Enable< OStringConcat< T, const char[ N ] >, ToStringHelper< T >::allowOStringConcat >::Type operator+( const T& left, const char (&right)[ N ] ) { @@ -238,7 +238,7 @@ typename libreoffice_internal::Enable< OStringConcat< T, const char[ N ] >, ToSt } template< typename T, int N > -SAL_WARN_UNUSED_RESULT +[[nodiscard]] inline typename libreoffice_internal::Enable< OStringConcat< const char[ N ], T >, ToStringHelper< T >::allowOStringConcat >::Type operator+( const char (&left)[ N ], const T& right ) { @@ -246,7 +246,7 @@ typename libreoffice_internal::Enable< OStringConcat< const char[ N ], T >, ToSt } template< typename T, int N > -SAL_WARN_UNUSED_RESULT +[[nodiscard]] inline typename libreoffice_internal::Enable< OStringConcat< T, char[ N ] >, ToStringHelper< T >::allowOStringConcat >::Type operator+( const T& left, char (&right)[ N ] ) { @@ -254,7 +254,7 @@ typename libreoffice_internal::Enable< OStringConcat< T, char[ N ] >, ToStringHe } template< typename T, int N > -SAL_WARN_UNUSED_RESULT +[[nodiscard]] inline typename libreoffice_internal::Enable< OStringConcat< char[ N ], T >, ToStringHelper< T >::allowOStringConcat >::Type operator+( char (&left)[ N ], const T& right ) { @@ -262,7 +262,7 @@ typename libreoffice_internal::Enable< OStringConcat< char[ N ], T >, ToStringHe } template< typename T1, typename T2 > -SAL_WARN_UNUSED_RESULT +[[nodiscard]] inline typename libreoffice_internal::Enable< OUStringConcat< T1, T2 >, ToStringHelper< T1 >::allowOUStringConcat && ToStringHelper< T2 >::allowOUStringConcat >::Type operator+( const T1& left, const T2& right ) { @@ -270,7 +270,7 @@ typename libreoffice_internal::Enable< OUStringConcat< T1, T2 >, ToStringHelper< } template< typename T1, typename T2 > -SAL_WARN_UNUSED_RESULT +[[nodiscard]] inline typename libreoffice_internal::Enable< OUStringConcat< T1, T2 >, ToStringHelper< T1 >::allowOUStringConcat && ToStringHelper< T2 >::allowOUStringConcat && libreoffice_internal::ConstCharArrayDetector< T1, void >::ok >::Type operator+( T1& left, const T2& right ) { @@ -278,7 +278,7 @@ typename libreoffice_internal::Enable< OUStringConcat< T1, T2 >, ToStringHelper< } template< typename T1, typename T2 > -SAL_WARN_UNUSED_RESULT +[[nodiscard]] inline typename libreoffice_internal::Enable< OUStringConcat< T1, T2 >, ToStringHelper< T1 >::allowOUStringConcat && ToStringHelper< T2 >::allowOUStringConcat && libreoffice_internal::ConstCharArrayDetector< T2, void >::ok >::Type operator+( const T1& left, T2& right ) { diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index d803a1ad4e6f..5f738cfaa5fc 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -2413,7 +2413,7 @@ public: #if defined LIBO_INTERNAL_ONLY /** @overload @since LibreOffice 5.3 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16 replaceFirst(T & from, OUString const & to, sal_Int32 * index = nullptr) @@ -2433,7 +2433,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.3 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16 replaceFirst(OUString const & from, T & to, sal_Int32 * index = nullptr) @@ -2453,7 +2453,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.3 */ - template<typename T1, typename T2> SAL_WARN_UNUSED_RESULT + template<typename T1, typename T2> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector< T1, @@ -2477,7 +2477,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.3 */ - template<typename T1, typename T2> SAL_WARN_UNUSED_RESULT + template<typename T1, typename T2> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector< T1, @@ -2501,7 +2501,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.3 */ - template<typename T1, typename T2> SAL_WARN_UNUSED_RESULT + template<typename T1, typename T2> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector< T1, @@ -2526,7 +2526,7 @@ public: } /** @overload @since LibreOffice 5.4 */ - SAL_WARN_UNUSED_RESULT OUString replaceFirst( + [[nodiscard]] OUString replaceFirst( OUStringLiteral const & from, OUString const & to, sal_Int32 * index = nullptr) const { @@ -2538,7 +2538,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - SAL_WARN_UNUSED_RESULT OUString replaceFirst( + [[nodiscard]] OUString replaceFirst( OUString const & from, OUStringLiteral const & to, sal_Int32 * index = nullptr) const { @@ -2550,7 +2550,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - SAL_WARN_UNUSED_RESULT OUString replaceFirst( + [[nodiscard]] OUString replaceFirst( OUStringLiteral const & from, OUStringLiteral const & to, sal_Int32 * index = nullptr) const { @@ -2562,7 +2562,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type replaceFirst( OUStringLiteral const & from, T & to, sal_Int32 * index = nullptr) const @@ -2578,7 +2578,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type replaceFirst( T & from, OUStringLiteral const & to, sal_Int32 * index = nullptr) const @@ -2594,7 +2594,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16 replaceFirst( @@ -2611,7 +2611,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16 replaceFirst( @@ -2733,7 +2733,7 @@ public: #if defined LIBO_INTERNAL_ONLY /** @overload @since LibreOffice 5.3 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16 replaceAll(T & from, OUString const & to) const { @@ -2750,7 +2750,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.3 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16 replaceAll(OUString const & from, T & to) const { @@ -2766,7 +2766,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.3 */ - template<typename T1, typename T2> SAL_WARN_UNUSED_RESULT + template<typename T1, typename T2> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector< T1, @@ -2788,7 +2788,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.3 */ - template<typename T1, typename T2> SAL_WARN_UNUSED_RESULT + template<typename T1, typename T2> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector< T1, @@ -2810,7 +2810,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.3 */ - template<typename T1, typename T2> SAL_WARN_UNUSED_RESULT + template<typename T1, typename T2> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector< T1, @@ -2833,7 +2833,7 @@ public: } /** @overload @since LibreOffice 5.4 */ - SAL_WARN_UNUSED_RESULT OUString replaceAll( + [[nodiscard]] OUString replaceAll( OUStringLiteral const & from, OUString const & to) const { rtl_uString * s = nullptr; @@ -2842,7 +2842,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - SAL_WARN_UNUSED_RESULT OUString replaceAll( + [[nodiscard]] OUString replaceAll( OUString const & from, OUStringLiteral const & to) const { rtl_uString * s = nullptr; @@ -2851,7 +2851,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - SAL_WARN_UNUSED_RESULT OUString replaceAll( + [[nodiscard]] OUString replaceAll( OUStringLiteral const & from, OUStringLiteral const & to) const { rtl_uString * s = nullptr; @@ -2860,7 +2860,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type replaceAll(OUStringLiteral const & from, T & to) const { assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to)); @@ -2872,7 +2872,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type replaceAll(T & from, OUStringLiteral const & to) const { assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from)); @@ -2885,7 +2885,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16 replaceAll(OUStringLiteral const & from, T & to) const { @@ -2898,7 +2898,7 @@ public: return OUString(s, SAL_NO_ACQUIRE); } /** @overload @since LibreOffice 5.4 */ - template<typename T> SAL_WARN_UNUSED_RESULT + template<typename T> [[nodiscard]] typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16 replaceAll(T & from, OUStringLiteral const & to) const { |