Cleanup: use const
Also use assert w/ rotate_m4.
This commit is contained in:
@@ -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__ */
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user