Skip to content

Commit f35c28e

Browse files
author
Martin Blicha
committed
Logic: Remove unnecessary check for corner case
1 parent 83c4bbe commit f35c28e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/logics/Logic.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using namespace std;
2525

2626
namespace {
2727
struct LessThanPTRefIgnoreNot {
28-
Logic & logic;
28+
Logic const & logic;
2929
LessThanPTRefIgnoreNot(Logic & logic) : logic{logic} {}
3030
bool operator() (PTRef first, PTRef second) {
3131
auto firstVal = logic.isNot(first) ? logic.getPterm(first)[0].x : first.x;
@@ -440,7 +440,6 @@ Logic::mkIte(vec<PTRef>&& args)
440440
// Check if arguments contain trues or a false and return the simplified
441441
// term
442442
PTRef Logic::mkAnd(vec<PTRef>&& args) {
443-
if (args.size() == 0) { return getTerm_true(); }
444443
// Remove duplicates
445444
std::sort(args.begin(), args.end(), LessThanPTRefIgnoreNot(*this));
446445
int i, j;
@@ -467,7 +466,6 @@ PTRef Logic::mkAnd(vec<PTRef>&& args) {
467466
}
468467

469468
PTRef Logic::mkOr(vec<PTRef> && args) {
470-
if (args.size() == 0) { return getTerm_false(); }
471469
// Remove duplicates
472470
std::sort(args.begin(), args.end(), LessThanPTRefIgnoreNot(*this));
473471
int i, j;

0 commit comments

Comments
 (0)