From 82c76d3374a30705cb080d2c8b21289b1a97ed8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 21 Jun 2026 18:00:13 +0200 Subject: [PATCH] GL: don't use the slower splitOnWhitespace() when split() is enough. The code was splitting on just a whitespace before the changes in 95b3f8578d4862b5c6abba6a12dd6b015e795a79 (2021), so I suppose I just accidentally copied the same code over from handling the --disable-extensions and --disable-workarounds arguments, where the user *is* allowed to use any whitespaces. And given that just a space worked well for over a decade before, there's no reason to pessimistically expect the extension strings suddenly include tabs or newlines. --- src/Magnum/GL/Context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index 960b9cade..00356aa78 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -1199,7 +1199,7 @@ Containers::Array Context::extensionStrings() const { #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2) { /* OpenGL 2.1 / OpenGL ES 2.0 doesn't have glGetStringi() */ - return Containers::StringView{reinterpret_cast(glGetString(GL_EXTENSIONS)), Containers::StringViewFlag::Global}.splitOnWhitespaceWithoutEmptyParts(); + return Containers::StringView{reinterpret_cast(glGetString(GL_EXTENSIONS)), Containers::StringViewFlag::Global}.splitWithoutEmptyParts(' '); } #endif }