diff --git a/modules/juce_opengl/opengl/juce_OpenGLPixelFormat.cpp b/modules/juce_opengl/opengl/juce_OpenGLPixelFormat.cpp index 168e09aba1..2b73e6fe31 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLPixelFormat.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLPixelFormat.cpp @@ -44,19 +44,24 @@ OpenGLPixelFormat::OpenGLPixelFormat (const int bitsPerRGBComponent, { } +static auto tie (const OpenGLPixelFormat& fmt) +{ + return std::tie (fmt.redBits, + fmt.greenBits, + fmt.blueBits, + fmt.alphaBits, + fmt.depthBufferBits, + fmt.stencilBufferBits, + fmt.accumulationBufferRedBits, + fmt.accumulationBufferGreenBits, + fmt.accumulationBufferBlueBits, + fmt.accumulationBufferAlphaBits, + fmt.multisamplingLevel); +} + bool OpenGLPixelFormat::operator== (const OpenGLPixelFormat& other) const noexcept { - return redBits == other.redBits - && greenBits == other.greenBits - && blueBits == other.blueBits - && alphaBits == other.alphaBits - && depthBufferBits == other.depthBufferBits - && stencilBufferBits == other.stencilBufferBits - && accumulationBufferRedBits == other.accumulationBufferRedBits - && accumulationBufferGreenBits == other.accumulationBufferGreenBits - && accumulationBufferBlueBits == other.accumulationBufferBlueBits - && accumulationBufferAlphaBits == other.accumulationBufferAlphaBits - && multisamplingLevel == other.multisamplingLevel; + return tie (*this) == tie (other); } bool OpenGLPixelFormat::operator!= (const OpenGLPixelFormat& other) const noexcept