17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00

Fix the GCC 13 and MSVC builds: no brace-initialised reference from reference_wrapper, no near/far names

This commit is contained in:
maj00r
2026-10-04 02:49:05 +02:00
parent ac82db8178
commit 9bd8226c51
4 changed files with 10 additions and 10 deletions

View File

@@ -1201,22 +1201,22 @@ editor_track::straight_run editor_track::straight_beyond(chain const &Chain, boo
outward = false;
else
break;
auto const &far{path.points[outward ? segment_data::point::end : segment_data::point::start]};
auto const &opposite{path.points[outward ? segment_data::point::end : segment_data::point::start]};
if (run.tracks.empty())
{
auto const own{glm::normalize(plan_of(far - joint))};
auto const own{glm::normalize(plan_of(opposite - joint))};
if (std::abs(cross(direction, own)) > 0.01 || glm::dot(direction, own) <= 0.0)
break;
direction = own;
}
auto const offset{plan_of(far) - origin};
auto const offset{plan_of(opposite) - origin};
auto const along{glm::dot(offset, direction)};
if (along <= run.length + 1e-3 || std::abs(cross(direction, offset)) > Tolerance.offset)
break;
run.tracks.push_back(current);
run.outward.push_back(outward);
run.length = along;
joint = far;
joint = opposite;
current = outward ? current->trNext : current->trPrev;
}
return run;