From aa15f4f4692115504339b9b6dacae5e38ce2faa2 Mon Sep 17 00:00:00 2001 From: Xiaowen Hu <573119056@qq.com> Date: Thu, 26 Nov 2020 14:55:40 +1100 Subject: [PATCH] use <= instead of < --- src/interpreter/Index.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpreter/Index.h b/src/interpreter/Index.h index 9236e17cbac..88dcb686620 100644 --- a/src/interpreter/Index.h +++ b/src/interpreter/Index.h @@ -185,7 +185,7 @@ class Index { /** Obtains a pair of iterators representing the given range within this index. */ souffle::range range(const Tuple& low, const Tuple& high) { - if (cmp.less(low, high) != true) { + if (cmp(low, high) > 0) { return {data.end(), data.end()}; } return {data.lower_bound(low, hints), data.upper_bound(high, hints)}; @@ -270,7 +270,7 @@ class Index { * Returns a pair of iterators covering elements in the range [low,high) */ souffle::range range(const Tuple& low, const Tuple& high) const { - if (cmp.less(low, high) != true) { + if (cmp(low, high) > 0) { return {data.end(), data.end()}; } return {data.lower_bound(low), data.upper_bound(high)};