mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Deduplicate the WebGL null_terminated_string helper
This commit is contained in:
parent
6c115171da
commit
df1aeda955
Notes:
github-actions[bot]
2025-11-05 01:20:56 +00:00
Author: https://github.com/cqundefine
Commit: df1aeda955
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6676
Reviewed-by: https://github.com/kalenikaliaksandr ✅
Reviewed-by: https://github.com/konradekk
4 changed files with 12 additions and 18 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue