From 9af0a9f58f42f7e129d02ef658fe6291b48fa037 Mon Sep 17 00:00:00 2001 From: Tim Malte Gräfje Date: Thu, 8 Jan 2015 18:18:33 +0100 Subject: Made parameters of generic vector functions const where applicable. This fixes all warnings that gcc with -Wall gave me. --- linmath.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/linmath.h b/linmath.h index 52248d1..a61d707 100644 --- a/linmath.h +++ b/linmath.h @@ -5,25 +5,25 @@ #define LINMATH_H_DEFINE_VEC(n) \ typedef float vec##n[n]; \ -static inline void vec##n##_add(vec##n r, vec##n a, vec##n b) \ +static inline void vec##n##_add(vec##n r, vec##n const a, vec##n const b) \ { \ int i; \ for(i=0; i Date: Sat, 24 Jan 2015 19:42:38 +0100 Subject: Removed extra ';' after macros This removes gcc and clang warnings (src/linmath.h:44:24: warning: extra ';' outside of a function [-Wextra-semi]) --- linmath.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linmath.h b/linmath.h index a61d707..f852c00 100644 --- a/linmath.h +++ b/linmath.h @@ -41,9 +41,9 @@ static inline void vec##n##_norm(vec##n r, vec##n const v) \ vec##n##_scale(r, v, k); \ } -LINMATH_H_DEFINE_VEC(2); -LINMATH_H_DEFINE_VEC(3); -LINMATH_H_DEFINE_VEC(4); +LINMATH_H_DEFINE_VEC(2) +LINMATH_H_DEFINE_VEC(3) +LINMATH_H_DEFINE_VEC(4) static inline void vec3_mul_cross(vec3 r, vec3 const a, vec3 const b) { -- cgit v1.2.3-54-g00ecf