remove const
This commit is contained in:
13
geometry.c
13
geometry.c
@@ -554,6 +554,12 @@ JSC_CCALL(geometry_rect_transform,
|
||||
// argv[1] = world_to_projection (16 floats)
|
||||
size_t byte_len;
|
||||
float *data12 = js_get_blob_data(js, &byte_len, argv[1]);
|
||||
if (data12 == -1)
|
||||
return JS_EXCEPTION;
|
||||
|
||||
if (byte_len == 0)
|
||||
return JS_ThrowTypeError(js, "Matrix blob contains no data");
|
||||
|
||||
HMM_Mat4 wp; memcpy(wp.Elements, data12, sizeof(wp.Elements));
|
||||
|
||||
// make our two corners at z=0
|
||||
@@ -1008,8 +1014,11 @@ JSC_CCALL(geometry_transform_xy_blob,
|
||||
// Get blob data
|
||||
size_t xy_size;
|
||||
float *xy_data = (float*)js_get_blob_data(js, &xy_size, xy_blob);
|
||||
if (!xy_data) {
|
||||
return JS_ThrowTypeError(js, "Failed to get XY blob data");
|
||||
if ((intptr_t)xy_data == -1) {
|
||||
return JS_EXCEPTION;
|
||||
}
|
||||
if (!xy_data || xy_size == 0) {
|
||||
return JS_ThrowTypeError(js, "XY blob contains no data");
|
||||
}
|
||||
|
||||
// Calculate number of vertices (each vertex has 2 floats: x, y)
|
||||
|
||||
Reference in New Issue
Block a user