Address code review feedback: improve array formatting and extract size constant

Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-18 08:58:37 +00:00
parent c08c9c4fb8
commit 3336d8d8ee
2 changed files with 17 additions and 16 deletions

View file

@ -47,10 +47,11 @@ void init_baked_points(void) {
{OPAFADEIN, &baked_points_opafadein},
{OPAFADEOUT, &baked_points_opafadeout},
};
const size_t num_animation_types =
sizeof(animation_types) / sizeof(animation_types[0]);
/* Allocate and calculate baked points for all animation types */
for (size_t j = 0; j < sizeof(animation_types) / sizeof(animation_types[0]);
j++) {
for (size_t j = 0; j < num_animation_types; j++) {
*animation_types[j].points =
calloc(BAKED_POINTS_COUNT, sizeof(struct dvec2));
for (int32_t i = 0; i < BAKED_POINTS_COUNT; i++) {

View file

@ -32,20 +32,20 @@ uint32_t animation_duration_open = 400; // Animation open speed
uint32_t animation_duration_tag = 300; // Animation tag speed
uint32_t animation_duration_close = 300; // Animation close speed
uint32_t animation_duration_focus = 0; // Animation focus opacity speed
double animation_curve_move[4] = {0.46, 1.0, 0.29,
0.99}; // Animation curve for move
double animation_curve_open[4] = {0.46, 1.0, 0.29,
0.99}; // Animation curve for open
double animation_curve_tag[4] = {0.46, 1.0, 0.29,
0.99}; // Animation curve for tag
double animation_curve_close[4] = {0.46, 1.0, 0.29,
0.99}; // Animation curve for close
double animation_curve_focus[4] = {0.46, 1.0, 0.29,
0.99}; // Animation curve for focus
double animation_curve_opafadein[4] = {
0.46, 1.0, 0.29, 0.99}; // Animation curve for opacity fade in
double animation_curve_opafadeout[4] = {
0.5, 0.5, 0.5, 0.5}; // Animation curve for opacity fade out
// Animation curve for move
double animation_curve_move[4] = {0.46, 1.0, 0.29, 0.99};
// Animation curve for open
double animation_curve_open[4] = {0.46, 1.0, 0.29, 0.99};
// Animation curve for tag
double animation_curve_tag[4] = {0.46, 1.0, 0.29, 0.99};
// Animation curve for close
double animation_curve_close[4] = {0.46, 1.0, 0.29, 0.99};
// Animation curve for focus
double animation_curve_focus[4] = {0.46, 1.0, 0.29, 0.99};
// Animation curve for opacity fade in
double animation_curve_opafadein[4] = {0.46, 1.0, 0.29, 0.99};
// Animation curve for opacity fade out
double animation_curve_opafadeout[4] = {0.5, 0.5, 0.5, 0.5};
/* appearance */
uint32_t axis_bind_apply_timeout =