diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index ab9f87c2e9..f34d388f19 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -189,7 +189,7 @@ bool ImpExpDxfRead::OnReadBlock(const std::string& name, int flags) // and don't want to be complaining about unhandled entity types. // Note that if it *is* for a hatch we could actually import it and use it to draw a hatch. } - else if (Blocks.count(name) > 0) { + else if (Blocks.contains(name)) { ImportError("Duplicate block name '%s'\n", name); } else { diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 2672b264b2..6168d77964 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2689,7 +2689,7 @@ bool CDxfRead::ReadSection() } void CDxfRead::ProcessLayerReference(CDxfRead* object, void* target) { - if (object->Layers.count(object->m_record_data) == 0) { + if (!object->Layers.contains(object->m_record_data)) { object->ImportError("First reference to missing Layer '%s'", object->m_record_data); // Synthesize the Layer so we don't get the same error again. // We need to take copies of the string arguments because MakeLayer uses them as move