summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-12-08 13:39:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-12-08 17:18:38 +0100
commit2e83a62f15b564edfe7f585dd72fcb41058120b3 (patch)
treeb43e06c3a7867251813d876b5be32be3e7c32ebd /include
parentcross-compiling: no need for gtk or gstreamer for BUILD (diff)
downloadcore-2e83a62f15b564edfe7f585dd72fcb41058120b3.tar.gz
core-2e83a62f15b564edfe7f585dd72fcb41058120b3.zip
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')
-rw-r--r--include/filter/msfilter/msdffimp.hxx2
-rw-r--r--include/oox/helper/binaryinputstream.hxx22
-rw-r--r--include/oox/ole/axbinaryreader.hxx2
-rw-r--r--include/rtl/stringconcat.hxx16
-rw-r--r--include/rtl/ustring.hxx48
-rw-r--r--include/sfx2/docfile.hxx14
-rw-r--r--include/svx/svdundo.hxx2
-rw-r--r--include/svx/unoapi.hxx4
-rw-r--r--include/tools/helpers.hxx4
-rw-r--r--include/tools/stream.hxx2
-rw-r--r--include/vcl/bitmapex.hxx8
-rw-r--r--include/vcl/vclptr.hxx2
12 files changed, 63 insertions, 63 deletions
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index f6d0b76d5a20..4ff14484e398 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -574,7 +574,7 @@ public:
sal_uInt32 nMaxLen,
bool bUniCode);
- SAL_WARN_UNUSED_RESULT static bool ReadCommonRecordHeader( SvStream& rSt,
+ [[nodiscard]] static bool ReadCommonRecordHeader( SvStream& rSt,
sal_uInt8& rVer,
sal_uInt16& rInst,
sal_uInt16& rFbt,
diff --git a/include/oox/helper/binaryinputstream.hxx b/include/oox/helper/binaryinputstream.hxx
index 50c4c800961f..1174b0f61f2f 100644
--- a/include/oox/helper/binaryinputstream.hxx
+++ b/include/oox/helper/binaryinputstream.hxx
@@ -86,28 +86,28 @@ public:
All data types supported by the ByteOrderConverter class can be used.
*/
template< typename Type >
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
Type readValue();
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
sal_Int8 readInt8() { return readValue<sal_Int8>(); }
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
sal_uInt8 readuInt8() { return readValue<sal_uInt8>(); }
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
sal_Int16 readInt16() { return readValue<sal_Int16>(); }
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
sal_uInt16 readuInt16() { return readValue<sal_uInt16>(); }
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
sal_Int32 readInt32() { return readValue<sal_Int32>(); }
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
sal_uInt32 readuInt32() { return readValue<sal_uInt32>(); }
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
sal_Int64 readInt64() { return readValue<sal_Int64>(); }
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
float readFloat() { return readValue<float>(); }
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
double readDouble() { return readValue<double>(); }
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
unsigned char readuChar() { return readValue<unsigned char>(); }
/** Reads a (preallocated!) C array of values from the stream.
diff --git a/include/oox/ole/axbinaryreader.hxx b/include/oox/ole/axbinaryreader.hxx
index b15a7f1e4507..f9e3ddea24ff 100644
--- a/include/oox/ole/axbinaryreader.hxx
+++ b/include/oox/ole/axbinaryreader.hxx
@@ -76,7 +76,7 @@ public:
/** Aligns the stream according to the passed type and reads a value. */
template< typename Type >
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
Type readAligned() { align( sizeof( Type ) ); return readValue< Type >(); }
/** Aligns the stream according to the passed type and skips the size of the type. */
template< typename Type >
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 {
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 2f7d9454c1e5..8e22b0a40b31 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -132,13 +132,13 @@ public:
const INetURLObject& GetURLObject() const;
void CheckFileDate( const css::util::DateTime& aInitDate );
- SAL_WARN_UNUSED_RESULT bool DocNeedsFileDateCheck() const;
+ [[nodiscard]] bool DocNeedsFileDateCheck() const;
css::util::DateTime const & GetInitFileDate( bool bIgnoreOldValue );
css::uno::Reference< css::ucb::XContent > GetContent() const;
const OUString& GetPhysicalName() const;
- SAL_WARN_UNUSED_RESULT bool IsRemote() const;
- SAL_WARN_UNUSED_RESULT bool IsOpen() const; // { return aStorage.Is() || pInStream; }
+ [[nodiscard]] bool IsRemote() const;
+ [[nodiscard]] bool IsOpen() const; // { return aStorage.Is() || pInStream; }
void Download( const Link<void*,void>& aLink = Link<void*,void>());
void SetDoneLink( const Link<void*,void>& rLink );
@@ -178,23 +178,23 @@ public:
css::uno::Reference< css::embed::XStorage > GetStorage( bool bCreateTempIfNo = true );
css::uno::Reference< css::embed::XStorage > GetOutputStorage();
void ResetError();
- SAL_WARN_UNUSED_RESULT bool IsExpired() const;
+ [[nodiscard]] bool IsExpired() const;
void SetName( const OUString& rName, bool bSetOrigURL = false );
const css::uno::Sequence < css::util::RevisionTag >&
GetVersionList( bool _bNoReload = false );
- SAL_WARN_UNUSED_RESULT bool IsReadOnly() const;
+ [[nodiscard]] bool IsReadOnly() const;
// Whether the medium had originally been opened r/o (either because it is
// "physically" r/o, or because it was requested to be opened r/o,
// independent of later changes via SetOpenMode; used to keep track of the
// "true" state of the medium across toggles via SID_EDITDOC (which do
// change SetOpenMode):
- SAL_WARN_UNUSED_RESULT bool IsOriginallyReadOnly() const;
+ [[nodiscard]] bool IsOriginallyReadOnly() const;
// Whether the medium had originally been requested to be opened r/o,
// independent of later changes via SetOpenMode; used for SID_RELOAD:
- SAL_WARN_UNUSED_RESULT bool IsOriginallyLoadedReadOnly() const;
+ [[nodiscard]] bool IsOriginallyLoadedReadOnly() const;
css::uno::Reference< css::io::XInputStream > const & GetInputStream();
diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index 0b1d6ffee904..f046700050c3 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -128,7 +128,7 @@ protected:
void ImpTakeDescriptionStr(const char* pStrCacheID, OUString& rStr, bool bRepeat = false) const;
- SAL_WARN_UNUSED_RESULT static OUString GetDescriptionStringForObject( const SdrObject& _rForObject, const char* pStrCacheID, bool bRepeat = false );
+ [[nodiscard]] static OUString GetDescriptionStringForObject( const SdrObject& _rForObject, const char* pStrCacheID, bool bRepeat = false );
// #94278# new method for evtl. PageChange at UNDO/REDO
void ImpShowPageOfThisObject();
diff --git a/include/svx/unoapi.hxx b/include/svx/unoapi.hxx
index 0f07186497fb..71d699ad0a65 100644
--- a/include/svx/unoapi.hxx
+++ b/include/svx/unoapi.hxx
@@ -79,7 +79,7 @@ SVX_DLLPUBLIC bool SvxFieldUnitToMeasureUnit( const FieldUnit nVcl, short& eApi
*
* @throws std::exception
*/
-SAL_WARN_UNUSED_RESULT SVX_DLLPUBLIC OUString
+[[nodiscard]] SVX_DLLPUBLIC OUString
SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInternalName);
/**
@@ -88,7 +88,7 @@ SAL_WARN_UNUSED_RESULT SVX_DLLPUBLIC OUString
*
* @throws std::exception
*/
-SAL_WARN_UNUSED_RESULT SVX_DLLPUBLIC OUString
+[[nodiscard]] SVX_DLLPUBLIC OUString
SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& rApiName);
#endif // INCLUDED_SVX_UNOAPI_HXX
diff --git a/include/tools/helpers.hxx b/include/tools/helpers.hxx
index 2ce550c42e03..1d00bad7112e 100644
--- a/include/tools/helpers.hxx
+++ b/include/tools/helpers.hxx
@@ -78,7 +78,7 @@ inline long FRound( double fVal )
//valid range: (-180,180]
template <typename T>
-SAL_WARN_UNUSED_RESULT inline typename std::enable_if<std::is_signed<T>::value, T>::type
+[[nodiscard]] inline typename std::enable_if<std::is_signed<T>::value, T>::type
NormAngle180(T angle)
{
while (angle <= -180)
@@ -89,7 +89,7 @@ NormAngle180(T angle)
}
//valid range: [0,360)
-template <typename T> SAL_WARN_UNUSED_RESULT inline T NormAngle360(T angle)
+template <typename T> [[nodiscard]] inline T NormAngle360(T angle)
{
while (angle < 0)
angle += 360;
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index ea3e53d21ff9..e4da2748a3ac 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -564,7 +564,7 @@ inline std::size_t write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
return write_uInt16_lenPrefixed_uInt8s_FromOString(rStrm, OUStringToOString(rStr, eEnc));
}
-SAL_WARN_UNUSED_RESULT TOOLS_DLLPUBLIC bool checkSeek(SvStream &rSt, sal_uInt64 nOffset);
+[[nodiscard]] TOOLS_DLLPUBLIC bool checkSeek(SvStream &rSt, sal_uInt64 nOffset);
// FileStream
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index c519f459642d..722466aa2914 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -375,7 +375,7 @@ public:
@param bSmooth
Defines if pixel interpolation is to be used to create the result
*/
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
BitmapEx TransformBitmapEx(
double fWidth,
double fHeight,
@@ -403,7 +403,7 @@ public:
@return The transformed bitmap
*/
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
BitmapEx getTransformed(
const basegfx::B2DHomMatrix& rTransformation,
const basegfx::B2DRange& rVisibleRange,
@@ -415,10 +415,10 @@ public:
@param rBColorModifierStack
A ColrModifierStack which defines how each pixel has to be modified
*/
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
BitmapEx ModifyBitmapEx( const basegfx::BColorModifierStack& rBColorModifierStack) const;
- SAL_WARN_UNUSED_RESULT
+ [[nodiscard]]
static BitmapEx AutoScaleBitmap( BitmapEx const & aBitmap, const long aStandardSize );
/// populate from a canvas implementation
diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx
index 9e1ce33d3184..1308b5d1a68b 100644
--- a/include/vcl/vclptr.hxx
+++ b/include/vcl/vclptr.hxx
@@ -124,7 +124,7 @@ public:
*
* @tparam reference_type must be a subclass of vcl::Window
*/
- template<typename... Arg> SAL_WARN_UNUSED_RESULT static VclPtr< reference_type > Create(Arg &&... arg)
+ template<typename... Arg> [[nodiscard]] static VclPtr< reference_type > Create(Arg &&... arg)
{
return VclPtr< reference_type >( new reference_type(std::forward<Arg>(arg)...), SAL_NO_ACQUIRE );
}