diff --git a/application/editormodefields.cpp b/application/editormodefields.cpp index fa9f275a3..530b544d6 100644 --- a/application/editormodefields.cpp +++ b/application/editormodefields.cpp @@ -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 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; diff --git a/editor/editorTerrainStreamer.cpp b/editor/editorTerrainStreamer.cpp index 21ce6de79..22521a981 100644 --- a/editor/editorTerrainStreamer.cpp +++ b/editor/editorTerrainStreamer.cpp @@ -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