From 127531c847da1ca3b492dfbd1119469f0e44b00b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 23 Jul 2020 14:07:31 +0200 Subject: [PATCH] :art: Improve string eq --- src/lib/string.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/string.c b/src/lib/string.c index 4ddc7b87..98422c1f 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -30,9 +30,8 @@ static INSTR(String_##name) { \ release(lhs, shred); \ release(rhs, shred); \ } -describe_string_logical(eq, (lhs && rhs && !strcmp(STRING(lhs), STRING(rhs))) || (!lhs && !rhs)) -describe_string_logical(neq, (lhs && rhs && strcmp(STRING(lhs), STRING(rhs))) || - (lhs && !rhs) || (!lhs && rhs)) +describe_string_logical(eq, (lhs && rhs && STRING(lhs) == STRING(rhs)) || (!lhs && !rhs)) +describe_string_logical(neq, !(lhs && rhs && STRING(lhs) == STRING(rhs)) || (!lhs && !rhs)) static INSTR(String_Assign) { POP_REG(shred, SZ_INT); -- 2.43.0