mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Hoist STRING_SIZE constant
This commit is contained in:
Vendored
+2
-1
@@ -13,6 +13,8 @@ function stripNewline(str) {
|
|||||||
return str.replace(/\n/, ' ')
|
return str.replace(/\n/, ' ')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const STRING_SIZE = 2*4;
|
||||||
|
|
||||||
class WasmMemoryInterface {
|
class WasmMemoryInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.memory = null;
|
this.memory = null;
|
||||||
@@ -204,7 +206,6 @@ class WebGLInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
getSource(shader, strings_ptr, strings_length) {
|
getSource(shader, strings_ptr, strings_length) {
|
||||||
const STRING_SIZE = 2*4;
|
|
||||||
let source = "";
|
let source = "";
|
||||||
for (let i = 0; i < strings_length; i++) {
|
for (let i = 0; i < strings_length; i++) {
|
||||||
let ptr = this.mem.loadPtr(strings_ptr + i*STRING_SIZE);
|
let ptr = this.mem.loadPtr(strings_ptr + i*STRING_SIZE);
|
||||||
|
|||||||
Reference in New Issue
Block a user