Browse Source

OpenGLPixelFormat: Tidy up equality function

v6.1.6
reuk 3 years ago
parent
commit
056700572c
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 16 additions and 11 deletions
  1. +16
    -11
      modules/juce_opengl/opengl/juce_OpenGLPixelFormat.cpp

+ 16
- 11
modules/juce_opengl/opengl/juce_OpenGLPixelFormat.cpp View File

@@ -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 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 bool OpenGLPixelFormat::operator!= (const OpenGLPixelFormat& other) const noexcept


Loading…
Cancel
Save