From 5940fc4a3b60990b25bfada8db99bac1b4b34ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sat, 1 Apr 2017 03:13:52 +0200 Subject: [PATCH] Removed workarounds thanks to a fix in clingo. --- include/anthem/StatementVisitor.h | 6 +----- src/anthem/Simplification.cpp | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/anthem/StatementVisitor.h b/include/anthem/StatementVisitor.h index de9e6a5..cede5af 100644 --- a/include/anthem/StatementVisitor.h +++ b/include/anthem/StatementVisitor.h @@ -115,11 +115,7 @@ struct StatementVisitor if (antecedent.arguments.empty()) implies.antecedent = ast::Formula::make(true); else if (antecedent.arguments.size() == 1) - { - // TODO: remove workaround - auto tmp = std::move(antecedent.arguments[0]); - implies.antecedent = std::move(tmp); - } + implies.antecedent = std::move(antecedent.arguments[0]);; } return formulas; diff --git a/src/anthem/Simplification.cpp b/src/anthem/Simplification.cpp index 5340c2b..9d6f18f 100644 --- a/src/anthem/Simplification.cpp +++ b/src/anthem/Simplification.cpp @@ -155,9 +155,7 @@ void simplify(ast::Exists &exists, ast::Formula &formula) // If the argument now is a conjunction with just one element, directly replace the input formula with the argument if (conjunction.arguments.size() == 1) { - // TODO: remove workaround - auto tmp = std::move(conjunction.arguments.front()); - formula = std::move(tmp); + formula = std::move(conjunction.arguments.front()); return; }