aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/svg_doc.cpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-02-06 00:05:27 +0100
committerjaseg <git@jaseg.de>2021-02-06 00:05:27 +0100
commit8c494f77361a6774a30ee86a86c40c4bdeeda83a (patch)
treeef709f17fa7a82ec9424078b4f7a269cd8778873 /svg-flatten/src/svg_doc.cpp
parentbf428103d3a05289f66a6215374515dc98e46a14 (diff)
downloadgerbolyze-8c494f77361a6774a30ee86a86c40c4bdeeda83a.tar.gz
gerbolyze-8c494f77361a6774a30ee86a86c40c4bdeeda83a.tar.bz2
gerbolyze-8c494f77361a6774a30ee86a86c40c4bdeeda83a.zip
Work on fedora/debian compatibility
Diffstat (limited to 'svg-flatten/src/svg_doc.cpp')
-rw-r--r--svg-flatten/src/svg_doc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/svg-flatten/src/svg_doc.cpp b/svg-flatten/src/svg_doc.cpp
index 3b253be..e9c9dfc 100644
--- a/svg-flatten/src/svg_doc.cpp
+++ b/svg-flatten/src/svg_doc.cpp
@@ -95,14 +95,14 @@ bool gerbolyze::SVGDocument::load(istream &in, string debug_out_filename) {
const Paths *gerbolyze::SVGDocument::lookup_clip_path(const pugi::xml_node &node) {
string id(usvg_id_url(node.attribute("clip-path").value()));
- if (id.empty() || !clip_path_map.contains(id)) {
+ if (id.empty() || clip_path_map.count(id) == 0) {
return nullptr;
}
return &clip_path_map[id];
}
Pattern *gerbolyze::SVGDocument::lookup_pattern(const string id) {
- if (id.empty() || !pattern_map.contains(id)) {
+ if (id.empty() || pattern_map.count(id) == 0) {
return nullptr;
}
return &pattern_map[id];
@@ -484,7 +484,7 @@ void gerbolyze::SVGDocument::load_clips() {
/* Support clip paths that themselves have clip paths */
if (!meta_clip_path_id.empty()) {
- if (clip_path_map.contains(meta_clip_path_id)) {
+ if (clip_path_map.count(meta_clip_path_id) > 0) {
/* all clip paths must be closed */
c.AddPaths(clip_path_map[meta_clip_path_id], ptClip, /* closed */ true);