X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fextrudedshape.h;h=84addc46e7dde3fee65dea0283f56f2c0b29fc91;hb=b7d1873aa023f4d4b81b32a3bce0b88e1e0e63ac;hp=400c52b8122cdee3d45627b87822aa0bd4cea19f;hpb=34273ebb7de0a2150061c4e2bfa764e11ce740f7;p=libs%2Fmath.git diff --git a/source/geometry/extrudedshape.h b/source/geometry/extrudedshape.h index 400c52b..84addc4 100644 --- a/source/geometry/extrudedshape.h +++ b/source/geometry/extrudedshape.h @@ -41,7 +41,7 @@ template inline ExtrudedShape::ExtrudedShape(const Shape &b, T l): length(l) { - if(l<=0) + if(l<=T(0)) throw std::invalid_argument("ExtrudedShape::ExtrudedShape"); base = b.clone(); @@ -134,8 +134,8 @@ inline unsigned ExtrudedShape::get_intersections(const Ray &ray, Sur SurfacePoint *base_points = 0; if(points) - /* Shamelessly reuse the provided storage. Align to the end of the array - so processing can start from the first (nearest) point. */ + /* Shamelessly reuse the provided storage. Align to the end of the + array so processing can start from the first (nearest) point. */ base_points = reinterpret_cast *>(points+size)-size; unsigned count = base->get_intersections(base_ray, base_points, size);