upd: allow bool * str
This commit is contained in:
@ -118,16 +118,13 @@ int ConverToSameArithType(std::any &a, std::any &b,
|
|||||||
"situation",
|
"situation",
|
||||||
33);
|
33);
|
||||||
if (allow_string_operation && (ptr_a_string || ptr_b_string)) {
|
if (allow_string_operation && (ptr_a_string || ptr_b_string)) {
|
||||||
if (!(ptr_a_string || ptr_a_int2048))
|
if ((ptr_a_float || ptr_a_float))
|
||||||
throw InterpretException(
|
throw InterpretException(
|
||||||
"ConverToSameArithType: string operation not allowed in this "
|
"ConverToSameArithType: string operation not allowed in this "
|
||||||
"situation",
|
"situation",
|
||||||
34);
|
34);
|
||||||
if (!(ptr_b_string || ptr_b_int2048))
|
if (ptr_a_bool) a = ZYM::int2048(*ptr_a_bool);
|
||||||
throw InterpretException(
|
if (ptr_b_bool) b = ZYM::int2048(*ptr_b_bool);
|
||||||
"ConverToSameArithType: string operation not allowed in this "
|
|
||||||
"situation",
|
|
||||||
35);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
int level_a = (ptr_a_bool != nullptr ? 1 : 0) +
|
int level_a = (ptr_a_bool != nullptr ? 1 : 0) +
|
||||||
|
Reference in New Issue
Block a user