From 0f1adc353bcd5b4b184a84f7d5d8a698d2db90ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu>
Date: Mon, 21 Sep 2020 16:34:00 +0200
Subject: [PATCH] Revert "further checks in print"

This reverts commit 3e31b91cf4e759f29dcd25271481e02c7ea5d3df
---
 src/factor/factor_base.cpp | 28 ++++++++--------------------
 1 file changed, 8 insertions(+), 20 deletions(-)

diff --git a/src/factor/factor_base.cpp b/src/factor/factor_base.cpp
index 429379fe9..a0b4bc900 100644
--- a/src/factor/factor_base.cpp
+++ b/src/factor/factor_base.cpp
@@ -315,29 +315,17 @@ void FactorBase::printHeader(int _depth, bool _constr_by, bool _metric, bool _st
         _stream << " Abs";
 
     for (const auto& Fow : getFrameOtherList())
-    {
-        auto Fow_sh = Fow.lock();
-        if (Fow_sh)
-            _stream << " Frm" << Fow_sh->id();
-    }
+        if (!Fow.expired())
+            _stream << " Frm" << Fow.lock()->id();
     for (const auto& Cow : getCaptureOtherList())
-    {
-        auto Cow_sh = Cow.lock();
-        if (Cow_sh)
-            _stream << " Cap" << Cow_sh->id();
-    }
+        if (!Cow.expired())
+            _stream << " Cap" << Cow.lock()->id();
     for (const auto& fow : getFeatureOtherList())
-    {
-        auto fow_sh = fow.lock();
-        if (fow_sh)
-            _stream << " Ftr" << fow_sh->id();
-    }
+        if (!fow.expired())
+            _stream << " Ftr" << fow.lock()->id();
     for (const auto& Low : getLandmarkOtherList())
-    {
-        auto Low_sh = Low.lock();
-        if (Low_sh)
-            _stream << " Lmk" << Low_sh->id();
-    }
+        if (!Low.expired())
+            _stream << " Lmk" << Low.lock()->id();
     _stream << std::endl;
 }
 
-- 
GitLab