| 50 | } |
| 51 | |
| 52 | const SVGPattern* SVGPattern::hrefTarget(const SVGRenderContext& context) const { |
| 53 | if (Href.iri().empty()) { |
| 54 | return nullptr; |
| 55 | } |
| 56 | |
| 57 | const auto href = context.findNodeById(Href); |
| 58 | if (!href || href->tag() != SVGTag::Pattern) { |
| 59 | return nullptr; |
| 60 | } |
| 61 | |
| 62 | return static_cast<const SVGPattern*>(href.get()); |
| 63 | } |
| 64 | |
| 65 | template <typename T> |
| 66 | int inherit_if_needed(const std::optional<T>& src, std::optional<T>& dst) { |
no test coverage detected