From 84e0cc72934e90231b5fe8f07a03a6cab47714b4 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 4 Mar 2024 19:01:18 -0600 Subject: [PATCH] Apply suggestions from code review --- src/App/ElementMap.cpp | 4 ++-- src/Mod/Part/App/TopoShapeExpansion.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/App/ElementMap.cpp b/src/App/ElementMap.cpp index d149b5fb4f..d6012c7215 100644 --- a/src/App/ElementMap.cpp +++ b/src/App/ElementMap.cpp @@ -1379,14 +1379,14 @@ void ElementMap::traceElement(const MappedName& name, long masterTag, TraceCallb MappedName tmp; bool first = true; - // TODO: element tracing without object is inheriently unsafe, because of + // TODO: element tracing without object is inherently unsafe, because of // possible external linking object which means the element may be encoded // using external string table. Looking up the wrong table may accidentally // cause circular mapping, and is actually quite easy to reproduce. See // // https://github.com/realthunder/FreeCAD_assembly3/issues/968 // - // A random depth limit is set here to not waste time. 'tagSet' above is + // An arbitrary depth limit is set here to not waste time. 'tagSet' above is // also used for early detection of 'recursive' mapping. for (int index = 0; index < 50; ++index) { diff --git a/src/Mod/Part/App/TopoShapeExpansion.cpp b/src/Mod/Part/App/TopoShapeExpansion.cpp index 90a1f7e030..0ce927e884 100644 --- a/src/Mod/Part/App/TopoShapeExpansion.cpp +++ b/src/Mod/Part/App/TopoShapeExpansion.cpp @@ -5014,11 +5014,13 @@ bool TopoShape::getRelatedElementsCached(const Data::MappedName &name, HistoryTraceType sameType, QVector &names) const { - if(!_cache) + if(!_cache) { return false; + } auto it = _cache->relations.find(ShapeRelationKey(name,sameType)); - if(it == _cache->relations.end()) + if(it == _cache->relations.end()) { return false; + } names = it->second; return true; }