mirror of
https://github.com/recp/cglm.git
synced 2026-11-18 02:17:13 -06:00
add const to function parameters where possible
- Adds `const` qualifiers to read-only pointer and array parameters. - Multi-dimentional array parameters use the `CGLM_CONST` macro instead, because for these `const` only works in C++ and C23 (with N2607). - For `glm_mat4_mulN`, the matrices are not const-qualified although they are read-only, but changing the pointer type would require changing application code. - Incorrect incorrect in/out in doc comments was fixed for `glm_ray_sphere`, `glm_swapf`, `glm_quat_rotate_at`.
This commit is contained in:
1 parent
75a19a54d0
commit
44b6d7f332
161 files changed
+2426
-2431
No files matched your search
+37
-37
@@ -10,13 +10,13 @@
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3(ivec4 v4, ivec3 dest) {
|
||||
glmc_ivec3(const ivec4 v4, ivec3 dest) {
|
||||
glm_ivec3(v4, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_copy(ivec3 a, ivec3 dest) {
|
||||
glmc_ivec3_copy(const ivec3 a, ivec3 dest) {
|
||||
glm_ivec3_copy(a, dest);
|
||||
}
|
||||
|
||||
@@ -34,181 +34,181 @@ glmc_ivec3_one(ivec3 v) {
|
||||
|
||||
CGLM_EXPORT
|
||||
int
|
||||
glmc_ivec3_dot(ivec3 a, ivec3 b) {
|
||||
glmc_ivec3_dot(const ivec3 a, const ivec3 b) {
|
||||
return glm_ivec3_dot(a, b);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
int
|
||||
glmc_ivec3_norm2(ivec3 v) {
|
||||
glmc_ivec3_norm2(const ivec3 v) {
|
||||
return glm_ivec3_norm2(v);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
int
|
||||
glmc_ivec3_norm(ivec3 v) {
|
||||
glmc_ivec3_norm(const ivec3 v) {
|
||||
return glm_ivec3_norm(v);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_add(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_add(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_add(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_adds(ivec3 v, int s, ivec3 dest) {
|
||||
glmc_ivec3_adds(const ivec3 v, int s, ivec3 dest) {
|
||||
glm_ivec3_adds(v, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_sub(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_sub(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_sub(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_subs(ivec3 v, int s, ivec3 dest) {
|
||||
glmc_ivec3_subs(const ivec3 v, int s, ivec3 dest) {
|
||||
glm_ivec3_subs(v, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_mul(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_mul(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_mul(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_scale(ivec3 v, int s, ivec3 dest) {
|
||||
glmc_ivec3_scale(const ivec3 v, int s, ivec3 dest) {
|
||||
glm_ivec3_scale(v, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_div(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_div(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_div(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_divs(ivec3 v, int s, ivec3 dest) {
|
||||
glmc_ivec3_divs(const ivec3 v, int s, ivec3 dest) {
|
||||
glm_ivec3_divs(v, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_mod(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_mod(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_mod(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_addadd(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_addadd(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_addadd(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_addadds(ivec3 a, int s, ivec3 dest) {
|
||||
glmc_ivec3_addadds(const ivec3 a, int s, ivec3 dest) {
|
||||
glm_ivec3_addadds(a, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_subadd(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_subadd(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_subadd(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_subadds(ivec3 a, int s, ivec3 dest) {
|
||||
glmc_ivec3_subadds(const ivec3 a, int s, ivec3 dest) {
|
||||
glm_ivec3_subadds(a, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_muladd(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_muladd(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_muladd(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_muladds(ivec3 a, int s, ivec3 dest) {
|
||||
glmc_ivec3_muladds(const ivec3 a, int s, ivec3 dest) {
|
||||
glm_ivec3_muladds(a, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_maxadd(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_maxadd(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_maxadd(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_minadd(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_minadd(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_minadd(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_subsub(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_subsub(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_subsub(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_subsubs(ivec3 a, int s, ivec3 dest) {
|
||||
glmc_ivec3_subsubs(const ivec3 a, int s, ivec3 dest) {
|
||||
glm_ivec3_subsubs(a, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_addsub(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_addsub(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_addsub(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_addsubs(ivec3 a, int s, ivec3 dest) {
|
||||
glmc_ivec3_addsubs(const ivec3 a, int s, ivec3 dest) {
|
||||
glm_ivec3_addsubs(a, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_mulsub(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_mulsub(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_mulsub(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_mulsubs(ivec3 a, int s, ivec3 dest) {
|
||||
glmc_ivec3_mulsubs(const ivec3 a, int s, ivec3 dest) {
|
||||
glm_ivec3_mulsubs(a, s, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_maxsub(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_maxsub(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_maxsub(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_minsub(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_minsub(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_minsub(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
int
|
||||
glmc_ivec3_distance2(ivec3 a, ivec3 b) {
|
||||
glmc_ivec3_distance2(const ivec3 a, const ivec3 b) {
|
||||
return glm_ivec3_distance2(a, b);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_ivec3_distance(ivec3 a, ivec3 b) {
|
||||
glmc_ivec3_distance(const ivec3 a, const ivec3 b) {
|
||||
return glm_ivec3_distance(a, b);
|
||||
}
|
||||
|
||||
@@ -220,25 +220,25 @@ glmc_ivec3_fill(ivec3 v, int val) {
|
||||
|
||||
CGLM_EXPORT
|
||||
bool
|
||||
glmc_ivec3_eq(ivec3 v, int val) {
|
||||
glmc_ivec3_eq(const ivec3 v, int val) {
|
||||
return glm_ivec3_eq(v, val);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
bool
|
||||
glmc_ivec3_eqv(ivec3 a, ivec3 b) {
|
||||
glmc_ivec3_eqv(const ivec3 a, const ivec3 b) {
|
||||
return glm_ivec3_eqv(a, b);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_maxv(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_maxv(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_maxv(a, b, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_minv(ivec3 a, ivec3 b, ivec3 dest) {
|
||||
glmc_ivec3_minv(const ivec3 a, const ivec3 b, ivec3 dest) {
|
||||
glm_ivec3_minv(a, b, dest);
|
||||
}
|
||||
|
||||
@@ -250,6 +250,6 @@ glmc_ivec3_clamp(ivec3 v, int minVal, int maxVal) {
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ivec3_abs(ivec3 v, ivec3 dest) {
|
||||
glmc_ivec3_abs(const ivec3 v, ivec3 dest) {
|
||||
glm_ivec3_abs(v, dest);
|
||||
}
|
||||
Reference in new issue
Block a user