diff --git a/Siv3D/src/Siv3D/Polygon/PolygonDetail.cpp b/Siv3D/src/Siv3D/Polygon/PolygonDetail.cpp index ed0568ce9c..925e32a330 100644 --- a/Siv3D/src/Siv3D/Polygon/PolygonDetail.cpp +++ b/Siv3D/src/Siv3D/Polygon/PolygonDetail.cpp @@ -18,8 +18,7 @@ namespace s3d { namespace detail { - template - static RectF CalculateBoundingRect(const Vector2D* const pVertex, const size_t vertexSize) + static RectF CalculateBoundingRect(const Vec2* const pVertex, const size_t vertexSize) { assert(pVertex != nullptr); assert(vertexSize != 0); @@ -209,7 +208,7 @@ namespace s3d m_indices = std::move(indices); // [5 of 5] - m_boundingRect = detail::CalculateBoundingRect(pOuterVertex, vertexSize); + m_boundingRect = detail::CalculateBoundingRect(m_polygon.outer().data(), m_polygon.outer().size()); } const Array& Polygon::PolygonDetail::outer() const noexcept @@ -370,7 +369,7 @@ namespace s3d m_holes.back().insert(m_holes.back().end(), hole.begin(), hole.end()); } - m_boundingRect = detail::CalculateBoundingRect(m_vertices.data(), m_vertices.size()); + m_boundingRect = detail::CalculateBoundingRect(m_polygon.outer().data(), m_polygon.outer().size()); } void Polygon::PolygonDetail::transform(const double s, const double c, const Vec2& pos) @@ -417,7 +416,7 @@ namespace s3d m_holes.back().insert(m_holes.back().end(), hole.begin(), hole.end()); } - m_boundingRect = detail::CalculateBoundingRect(m_vertices.data(), m_vertices.size()); + m_boundingRect = detail::CalculateBoundingRect(m_polygon.outer().data(), m_polygon.outer().size()); } void Polygon::PolygonDetail::scale(const double s)