LibWeb: Deduplicate the WebGL null_terminated_string helper

This commit is contained in:
Undefine 2025-11-03 16:38:47 +01:00 committed by Alexander Kalenik
parent 6c115171da
commit df1aeda955
Notes: github-actions[bot] 2025-11-05 01:20:56 +00:00
4 changed files with 12 additions and 18 deletions

View file

@ -33,15 +33,6 @@ extern "C" {
namespace Web::WebGL {
static Vector<GLchar> null_terminated_string(StringView string)
{
Vector<GLchar> result;
for (auto c : string.bytes())
result.append(c);
result.append('\0');
return result;
}
WebGLRenderingContextImpl::WebGLRenderingContextImpl(JS::Realm& realm, NonnullOwnPtr<OpenGLContext> context)
: m_realm(realm)
, m_context(move(context))