upd: add support for -x*str
This commit is contained in:
@ -225,6 +225,13 @@ std::any Mul(std::any a, std::any b) {
|
||||
ptr_a_string = std::any_cast<std::string>(&a);
|
||||
ptr_b_string = std::any_cast<std::string>(&b);
|
||||
}
|
||||
if (Less(b, ZYM::int2048(0))) {
|
||||
b = Neg(b);
|
||||
ptr_b_bool = std::any_cast<bool>(&b);
|
||||
ptr_b_int2048 = std::any_cast<ZYM::int2048>(&b);
|
||||
ptr_b_float = std::any_cast<double>(&b);
|
||||
ptr_b_string = std::any_cast<std::string>(&b);
|
||||
}
|
||||
if (ptr_b_float != nullptr) {
|
||||
b = Any2Int(*ptr_b_float);
|
||||
ptr_b_int2048 = std::any_cast<ZYM::int2048>(&b);
|
||||
@ -279,6 +286,8 @@ std::any Div(std::any a, std::any b) {
|
||||
std::any Divv(std::any a, std::any b) {
|
||||
if (std::any_cast<NoneType>(&a)) a = (bool)false;
|
||||
if (std::any_cast<NoneType>(&b)) b = (bool)false;
|
||||
if (std::any_cast<std::string>(&a) != nullptr) a = ZYM::int2048(0);
|
||||
if (std::any_cast<std::string>(&b) != nullptr) b = ZYM::int2048(0);
|
||||
ConverToSameArithType(a, b);
|
||||
bool *ptr_a_bool = std::any_cast<bool>(&a);
|
||||
bool *ptr_b_bool = std::any_cast<bool>(&b);
|
||||
|
Reference in New Issue
Block a user