1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-21 01:24:21 +00:00

Add some missing nodiscards

This commit is contained in:
reuk 2026-01-15 09:23:13 +00:00
parent cca93a4b6a
commit be99ae4c05
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ namespace juce
@tags{Core}
*/
template <typename Fn> struct ScopeGuard : Fn { ~ScopeGuard() { Fn::operator()(); } };
template <typename Fn> struct [[nodiscard]] ScopeGuard : Fn { ~ScopeGuard() { Fn::operator()(); } };
template <typename Fn> ScopeGuard (Fn) -> ScopeGuard<Fn>;
/**

View file

@ -36,7 +36,7 @@ namespace juce
{
//==============================================================================
class ScopedThreadDPIAwarenessSetter
class [[nodiscard]] ScopedThreadDPIAwarenessSetter
{
public:
explicit ScopedThreadDPIAwarenessSetter (void* nativeWindow);