Skip to content
Snippets Groups Projects
Commit 0d4f6183 authored by Johannes Junggeburth's avatar Johannes Junggeburth :dog2:
Browse files

Apply 3 suggestion(s) to 3 file(s)

parent 585e03c2
No related branches found
No related tags found
1 merge request!226GeoTransforms - Introduce smart pointers for memory management
Pipeline #6587803 passed
......@@ -39,8 +39,6 @@ class GeoAlignableTransform final : public GeoTransform
virtual ~GeoAlignableTransform() = default;
private:
GeoAlignableTransform(const GeoAlignableTransform &right);
GeoAlignableTransform & operator=(const GeoAlignableTransform &right);
// Pointer to an alignment correction. Until some
// alignment correction is set, this pointer is nullptr and
......
......@@ -23,8 +23,6 @@ class GeoTransform : public GeoGraphNode {
public:
GeoTransform(const GeoTrf::Transform3D& transform);
GeoTransform(const GeoTransform &right) = delete;
GeoTransform & operator=(const GeoTransform &right) = delete;
/// Gets the total transformation.
virtual GeoTrf::Transform3D getTransform(const GeoVAlignmentStore* store=nullptr) const;
......
......@@ -68,7 +68,7 @@ void GeoAlignableTransform::clearDelta(GeoVAlignmentStore* store) {
std::set<GeoGraphNode*> uniqueParents;
for(GeoGraphNode* parent : m_parentList) {
if(!uniqueParents.insert(parent).second) {
if(uniqueParents.insert(parent).second) {
GeoSelClearAbsPosAction cc(this);
parent->exec(&cc);
}
......
  • Maintainer

    It seems like some logic was inverted in GeoAlignableTransform. Why? Did you introduce and then fix some faulty code?

  • Author Maintainer

    The old code was checking that the element is not in the uniqueParents list

    if(uniqueParents.find(parent)==uniqueParents.end()) {

    while in the new version I accidentially, put first

     if(!uniqueParents.insert(parent).second) {

    which is a invert of the logic. Indeed, I fixed a logical typo.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment