diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-05 15:39:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-05 15:45:44 +0300 |
commit | 4d85396fe4f7e3a870fb844b5207179f7dd03eb2 (patch) | |
tree | a253707c4af8fee09da0027c8403dca16ed0c7a7 /source/blender/blenlib | |
parent | b0bbb5f34f414e4759222a0c1a6fb9e324898235 (diff) |
Cleanup: use const
Also use assert w/ rotate_m4.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_dial.h | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_dial.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_matrix.c | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenlib/BLI_dial.h b/source/blender/blenlib/BLI_dial.h index ad7680fe03e..71ab57bb61a 100644 --- a/source/blender/blenlib/BLI_dial.h +++ b/source/blender/blenlib/BLI_dial.h @@ -52,8 +52,8 @@ typedef struct Dial Dial; -Dial *BLI_dial_initialize(float start_position[2], float threshold); +Dial *BLI_dial_initialize(const float start_position[2], float threshold); -float BLI_dial_angle(Dial *dial, float current_position[2]); +float BLI_dial_angle(Dial *dial, const float current_position[2]); #endif /* __BLI_DIAL_H__ */ diff --git a/source/blender/blenlib/intern/BLI_dial.c b/source/blender/blenlib/intern/BLI_dial.c index cfbb52847fd..89f18fa10b4 100644 --- a/source/blender/blenlib/intern/BLI_dial.c +++ b/source/blender/blenlib/intern/BLI_dial.c @@ -46,7 +46,7 @@ struct Dial { }; -Dial *BLI_dial_initialize(float start_position[2], float threshold) +Dial *BLI_dial_initialize(const float start_position[2], float threshold) { Dial *dial = MEM_callocN(sizeof(Dial), "dial"); @@ -56,7 +56,7 @@ Dial *BLI_dial_initialize(float start_position[2], float threshold) return dial; } -float BLI_dial_angle(Dial *dial, float current_position[2]) +float BLI_dial_angle(Dial *dial, const float current_position[2]) { float current_direction[2]; diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index f47f9ad76e6..d1a219c196a 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -1663,6 +1663,9 @@ void rotate_m4(float mat[4][4], const char axis, const float angle) mat[0][col] = temp; } break; + default: + BLI_assert(0); + break; } } |