mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 05:04:58 +01:00
chore(editor): Fields: one identifier a statement, contains() for the sets (Sonar cpp:S1659, cpp:S6171)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
This commit is contained in:
@@ -54,13 +54,15 @@ void reach_of(heightmap::surface_patch const &Patch, glm::dvec2 &Low, glm::dvec2
|
||||
// well: the separate fields left that overlap the closed outline are cut again (a cut leaves the holes there are as they are)
|
||||
void recut_separate_over(terrain_streamer &Streamer, std::vector<heightmap::surface_patch> const &Patches, heightmap::surface_patch const &Closed)
|
||||
{
|
||||
glm::dvec2 low, high;
|
||||
glm::dvec2 low;
|
||||
glm::dvec2 high;
|
||||
Closed.bounds(low, high);
|
||||
for (auto const &patch : Patches)
|
||||
{
|
||||
if (patch.paint || patch.outline.size() < 3)
|
||||
continue;
|
||||
glm::dvec2 otherlow, otherhigh;
|
||||
glm::dvec2 otherlow;
|
||||
glm::dvec2 otherhigh;
|
||||
patch.bounds(otherlow, otherhigh);
|
||||
if (otherlow.x > high.x || otherhigh.x < low.x || otherlow.y > high.y || otherhigh.y < low.y)
|
||||
continue;
|
||||
|
||||
@@ -921,7 +921,7 @@ bool terrain_streamer::waits_for_ground(heightmap::surface_patch const &Patch) c
|
||||
for (auto x{std::min(first.first, last.first)}; x <= std::max(first.first, last.first); ++x)
|
||||
{
|
||||
chunk_key const key{x, z};
|
||||
if (m_chunks.count(key) > 0 || m_removed.count(key) > 0)
|
||||
if (m_chunks.contains(key) || m_removed.contains(key))
|
||||
continue;
|
||||
// still coming while its pack isn't read yet (just after opening the scenery none is); not coming only when
|
||||
// the pack is missing, or read and without that chunk
|
||||
|
||||
Reference in New Issue
Block a user