Skip to content

Commit 5cdc21b

Browse files
committed
OpenGLGraphicsContext: Avoid warning about non-constexpr function call in implicitly-constexpr constructor with GCC 16
1 parent 9265f2b commit 5cdc21b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ class SavedBinding
955955
GLuint current{};
956956
};
957957

958-
Values values = []
958+
static Values getInitialValues()
959959
{
960960
if (! Traits::predicate())
961961
return Values{};
@@ -968,7 +968,9 @@ class SavedBinding
968968
Traits::bind (current);
969969

970970
return Values { previous, current };
971-
}();
971+
}
972+
973+
Values values = getInitialValues();
972974
};
973975

974976
//==============================================================================

0 commit comments

Comments
 (0)