Don't bother marking lambdas as static

The compiler already ensures that these are only constructed once
so it's not meaningful to also add static here to potentially optimize.
This commit is contained in:
Chris Thrasher 2025-01-22 23:23:15 -07:00
parent 58a3abd433
commit f8aff1bc0a
No known key found for this signature in database
GPG Key ID: 56FB686C9DFC8E2C
3 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ int main()
break; break;
} }
static const auto vec2ToString = [](const sf::Vector2i vec2) const auto vec2ToString = [](const sf::Vector2i vec2)
{ return '(' + std::to_string(vec2.x) + ", " + std::to_string(vec2.y) + ')'; }; { return '(' + std::to_string(vec2.x) + ", " + std::to_string(vec2.y) + ')'; };
if (const auto* const mouseMoved = event->getIf<sf::Event::MouseMoved>()) if (const auto* const mouseMoved = event->getIf<sf::Event::MouseMoved>())

View File

@ -55,7 +55,7 @@ namespace
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void extensionSanityCheck() void extensionSanityCheck()
{ {
static const auto check = [](int& flag, auto... entryPoints) const auto check = [](int& flag, auto... entryPoints)
{ {
// If a required entry point is missing, flag the whole extension as unavailable // If a required entry point is missing, flag the whole extension as unavailable
if (!(entryPoints && ...)) if (!(entryPoints && ...))

View File

@ -919,7 +919,7 @@ void GlContext::initialize(const ContextSettings& requestedSettings)
// Desktop OpenGL: The beginning of the returned string is "major.minor" // Desktop OpenGL: The beginning of the returned string is "major.minor"
// Helper to parse OpenGL version strings // Helper to parse OpenGL version strings
static const auto parseVersionString = const auto parseVersionString =
[](const char* versionString, const char* prefix, unsigned int& major, unsigned int& minor) [](const char* versionString, const char* prefix, unsigned int& major, unsigned int& minor)
{ {
const std::size_t prefixLength = std::strlen(prefix); const std::size_t prefixLength = std::strlen(prefix);