diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-10 18:04:04 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-11 13:48:55 +0200 |
commit | 3b835b8d546ca16d7edcb06eda017e276383ea0f (patch) | |
tree | 4d691d7d4fb2756735da020cece19ee1171d9a85 /include/rtl | |
parent | 3d39dad6d93c979ac64244ecb9acfbd8a5fbd6c6 (diff) |
Use [[nodiscard]] in SAL_WARN_UNUSED_RESULT where available
...which required some lax placements of SAL_WARN_UNUSED_RESULT to be fixed.
Also, Clang unfortunately is rather picky about the relative order of
SAL_WARN_UNUSED_RESULT expanding to [[nodiscard]] and uses of the DLLPUBLIC
macros (expanding to __attribute__(...) resp. __declspec(..) for clang-cl).
Change-Id: Iae6ca36bef97f1864873aefdb5f05c7f5e045ad3
Reviewed-on: https://gerrit.libreoffice.org/60274
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/rtl')
-rw-r--r-- | include/rtl/stringconcat.hxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/rtl/stringconcat.hxx b/include/rtl/stringconcat.hxx index cc3a9516b676..f1c1ca8b5e6e 100644 --- a/include/rtl/stringconcat.hxx +++ b/include/rtl/stringconcat.hxx @@ -221,8 +221,8 @@ struct ToStringHelper< OUStringConcat< T1, T2 > > }; template< typename T1, typename T2 > -inline SAL_WARN_UNUSED_RESULT +inline typename libreoffice_internal::Enable< OStringConcat< T1, T2 >, ToStringHelper< T1 >::allowOStringConcat && ToStringHelper< T2 >::allowOStringConcat >::Type operator+( const T1& left, const T2& right ) { return OStringConcat< T1, T2 >( left, right ); @@ -230,56 +230,56 @@ 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 > -inline SAL_WARN_UNUSED_RESULT +inline typename libreoffice_internal::Enable< OStringConcat< T, const char[ N ] >, ToStringHelper< T >::allowOStringConcat >::Type operator+( const T& left, const char (&right)[ N ] ) { return OStringConcat< T, const char[ N ] >( left, right ); } template< typename T, int N > -inline SAL_WARN_UNUSED_RESULT +inline typename libreoffice_internal::Enable< OStringConcat< const char[ N ], T >, ToStringHelper< T >::allowOStringConcat >::Type operator+( const char (&left)[ N ], const T& right ) { return OStringConcat< const char[ N ], T >( left, right ); } template< typename T, int N > -inline SAL_WARN_UNUSED_RESULT +inline typename libreoffice_internal::Enable< OStringConcat< T, char[ N ] >, ToStringHelper< T >::allowOStringConcat >::Type operator+( const T& left, char (&right)[ N ] ) { return OStringConcat< T, char[ N ] >( left, right ); } template< typename T, int N > -inline SAL_WARN_UNUSED_RESULT +inline typename libreoffice_internal::Enable< OStringConcat< char[ N ], T >, ToStringHelper< T >::allowOStringConcat >::Type operator+( char (&left)[ N ], const T& right ) { return OStringConcat< char[ N ], T >( left, right ); } template< typename T1, typename T2 > -inline SAL_WARN_UNUSED_RESULT +inline typename libreoffice_internal::Enable< OUStringConcat< T1, T2 >, ToStringHelper< T1 >::allowOUStringConcat && ToStringHelper< T2 >::allowOUStringConcat >::Type operator+( const T1& left, const T2& right ) { return OUStringConcat< T1, T2 >( left, right ); } template< typename T1, typename T2 > -inline SAL_WARN_UNUSED_RESULT +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 ) { return OUStringConcat< T1, T2 >( left, right ); } template< typename T1, typename T2 > -inline SAL_WARN_UNUSED_RESULT +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 ) { return OUStringConcat< T1, T2 >( left, right ); |