diff --git a/application/editormodegauge.cpp b/application/editormodegauge.cpp index f10d42a4..64ff2e61 100644 --- a/application/editormodegauge.cpp +++ b/application/editormodegauge.cpp @@ -189,7 +189,7 @@ public: } // whether the sphere may reach the gauge, roughly - bool near(glm::dvec3 const &Center, double const Radius) const + bool nearby(glm::dvec3 const &Center, double const Radius) const { auto const center{plan_of(Center)}; auto const reach{Radius + m_margin + region}; @@ -328,7 +328,7 @@ void scan_model(corridor const &Space, TAnimModel &Instance, std::vectorGetSMRoot() == nullptr) return; - if (false == Space.near(Instance.location(), Instance.radius())) + if (false == Space.nearby(Instance.location(), Instance.radius())) return; editor_mode::gauge_hit hit{Instance.name(), Instance.location()}; // the triangle enters the gauge when any point of a grid spread over it does diff --git a/application/editormodeinfra.cpp b/application/editormodeinfra.cpp index 67cf2333..ba3213ff 100644 --- a/application/editormodeinfra.cpp +++ b/application/editormodeinfra.cpp @@ -359,7 +359,7 @@ bool nearest_beside(Areas_ const &Areas, glm::dvec3 const &Point, double const C auto best{-1.0}; for (auto const &entry : Areas) { - track_area const &area{entry}; + track_area const &area = entry; if (plan_distance(Point, area.centre) > area.radius + Corridor) continue; infra::station station; diff --git a/application/editormodetrack.cpp b/application/editormodetrack.cpp index 4e3b9a94..b3b2c8e2 100644 --- a/application/editormodetrack.cpp +++ b/application/editormodetrack.cpp @@ -3330,9 +3330,9 @@ bool editor_mode::start_curve_fit(editor_track::straight const &Line) return false; if (state.fit_before.reversals != 0 || state.fit_after.reversals != 0) return false; - auto const far = [](editor_track::curve const &Curve, glm::dvec3 const &Joint) { return editor_track::touches(*Curve.from, Joint) ? Curve.to : Curve.from; }; - m_route.from = far(state.fit_before, Line.start); - m_route.to = far(state.fit_after, Line.end); + auto const other_end = [](editor_track::curve const &Curve, glm::dvec3 const &Joint) { return editor_track::touches(*Curve.from, Joint) ? Curve.to : Curve.from; }; + m_route.from = other_end(state.fit_before, Line.start); + m_route.to = other_end(state.fit_after, Line.end); route_reset(); if (m_route.chain.tracks.empty()) return false; diff --git a/editor/editorTrack.cpp b/editor/editorTrack.cpp index d43d3043..c370bf2f 100644 --- a/editor/editorTrack.cpp +++ b/editor/editorTrack.cpp @@ -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;