diff options
Diffstat (limited to 'thirdparty/msdfgen/core/ShapeDistanceFinder.hpp')
-rw-r--r-- | thirdparty/msdfgen/core/ShapeDistanceFinder.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/thirdparty/msdfgen/core/ShapeDistanceFinder.hpp b/thirdparty/msdfgen/core/ShapeDistanceFinder.hpp index 028738e5c3..07fb5cdc0e 100644 --- a/thirdparty/msdfgen/core/ShapeDistanceFinder.hpp +++ b/thirdparty/msdfgen/core/ShapeDistanceFinder.hpp @@ -9,7 +9,11 @@ ShapeDistanceFinder<ContourCombiner>::ShapeDistanceFinder(const Shape &shape) : template <class ContourCombiner> typename ShapeDistanceFinder<ContourCombiner>::DistanceType ShapeDistanceFinder<ContourCombiner>::distance(const Point2 &origin) { contourCombiner.reset(origin); - typename ContourCombiner::EdgeSelectorType::EdgeCache *edgeCache = &shapeEdgeCache[0]; +#ifdef MSDFGEN_USE_CPP11 + typename ContourCombiner::EdgeSelectorType::EdgeCache *edgeCache = shapeEdgeCache.data(); +#else + typename ContourCombiner::EdgeSelectorType::EdgeCache *edgeCache = shapeEdgeCache.empty() ? NULL : &shapeEdgeCache[0]; +#endif for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour) { if (!contour->edges.empty()) { |