From 5a56f3b5d3bb22a537793e75511ade157a317061 Mon Sep 17 00:00:00 2001 From: antao Date: Thu, 1 Nov 2018 15:45:23 +0800 Subject: [PATCH] Fix a bug (Winfinite-recursion) --- orm_lib/inc/drogon/orm/Criteria.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/orm_lib/inc/drogon/orm/Criteria.h b/orm_lib/inc/drogon/orm/Criteria.h index 5fe6a09b..871390a0 100644 --- a/orm_lib/inc/drogon/orm/Criteria.h +++ b/orm_lib/inc/drogon/orm/Criteria.h @@ -127,7 +127,8 @@ class Criteria const Criteria operator&&(Criteria cond1, Criteria cond2) { - assert(cond1 && cond2); + assert(cond1); + assert(cond2); Criteria cond; cond._condString = "( "; cond._condString += cond1._condString; @@ -150,7 +151,8 @@ const Criteria operator&&(Criteria cond1, Criteria cond2) } const Criteria operator||(Criteria cond1, Criteria cond2) { - assert(cond1 && cond2); + assert(cond1); + assert(cond2); Criteria cond; cond._condString = "( "; cond._condString += cond1._condString;