Skip to content

Commit b15d5f6

Browse files
committed
Add comments detailing the need to correct sxbp_suggest_previous_length_callback()
1 parent 38f4985 commit b15d5f6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sxbp/refine_figure_grow_from_start.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ static bool sxbp_suggest_previous_length_callback(
214214
// cast void pointer to a pointer to our context structure
215215
suggest_previous_length_context* callback_data =
216216
(suggest_previous_length_context*)data;
217+
// FIXME: This function is currently wrong:
218+
// Because of the way lines are plotted, all lines apart from line 0 have
219+
// their first coördinate marked as belonging to the previous line
220+
// This means that their origin coördinates actually are the ones before!
221+
217222
// lastly, update the current_location attribute to the one we've just seen
218223
callback_data->current_location = location;
219224
if (
@@ -333,6 +338,8 @@ static sxbp_length_t sxbp_suggest_previous_length(
333338
previous, collider, data.previous_origin, data.collider_origin
334339
);
335340
// TODO: replace with result of sxbp_resolve_collision() above
341+
// FIXME: This can't be done until sxbp_suggest_previous_length_callback
342+
// is fixed properly
336343
return previous.length + 1;
337344
}
338345
}

0 commit comments

Comments
 (0)