diff --git a/HandmadeMath.h b/HandmadeMath.h index b0f4026..9275b8f 100644 --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -316,7 +316,7 @@ typedef union hmm_vec2 float Elements[2]; #ifdef __cplusplus - inline float &operator[](int &Index) + inline float &operator[](int Index) { return Elements[Index]; } @@ -367,7 +367,7 @@ typedef union hmm_vec3 float Elements[3]; #ifdef __cplusplus - inline float &operator[](int &Index) + inline float &operator[](int Index) { return Elements[Index]; } @@ -431,7 +431,7 @@ typedef union hmm_vec4 #endif #ifdef __cplusplus - inline float &operator[](int &Index) + inline float &operator[](int Index) { return Elements[Index]; } @@ -447,7 +447,7 @@ typedef union hmm_mat4 #endif #ifdef __cplusplus - inline hmm_vec4 operator[](const int &Index) + inline hmm_vec4 operator[](const int Index) { float* col = Elements[Index];