From 3d37bd13504f1848a64002ade0da3d2a349616d8 Mon Sep 17 00:00:00 2001 From: ZhuangYumin Date: Fri, 10 Nov 2023 09:32:49 +0800 Subject: [PATCH] fix: allow None in Convert --- src/utils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils.cpp b/src/utils.cpp index 5e6ba4c..1ee73cf 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -106,6 +106,8 @@ std::any DeQuate(std::any val, VariableContainer &Variables) { int ConverToSameArithType(std::any &a, std::any &b, bool allow_string_operation) { + if (std::any_cast(&a)) a = (bool)false; + if (std::any_cast(&b)) b = (bool)false; ZYM::int2048 *ptr_a_int2048 = std::any_cast(&a); ZYM::int2048 *ptr_b_int2048 = std::any_cast(&b); double *ptr_a_float = std::any_cast(&a);