mirror of
https://github.com/recp/cglm.git
synced 2026-11-18 10: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
@@ -10,18 +10,18 @@
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_unprojecti_no(vec3 pos, mat4 invMat, vec4 vp, vec3 dest) {
|
||||
glmc_unprojecti_no(const vec3 pos, CGLM_CONST mat4 invMat, const vec4 vp, vec3 dest) {
|
||||
glm_unprojecti_no(pos, invMat, vp, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_project_no(vec3 pos, mat4 m, vec4 vp, vec3 dest) {
|
||||
glmc_project_no(const vec3 pos, CGLM_CONST mat4 m, const vec4 vp, vec3 dest) {
|
||||
glm_project_no(pos, m, vp, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_project_z_no(vec3 pos, mat4 m) {
|
||||
glmc_project_z_no(const vec3 pos, CGLM_CONST mat4 m) {
|
||||
return glm_project_z_no(pos, m);
|
||||
}
|
||||
Reference in new issue
Block a user