upd: further fixing
This commit is contained in:
@ -412,14 +412,15 @@ bool Greater(std::any a, std::any b) {
|
|||||||
return (*ptr_a_string) > (*ptr_b_string);
|
return (*ptr_a_string) > (*ptr_b_string);
|
||||||
else if (((ptr_a_string != nullptr) || (ptr_b_string != nullptr))) {
|
else if (((ptr_a_string != nullptr) || (ptr_b_string != nullptr))) {
|
||||||
if (std::any_cast<NoneType>(&b) && *ptr_a_string != "") return true;
|
if (std::any_cast<NoneType>(&b) && *ptr_a_string != "") return true;
|
||||||
// if (ptr_a_bool != nullptr) {
|
if (ptr_a_bool != nullptr) {
|
||||||
// b = Any2Bool(b);
|
b = Any2Bool(b);
|
||||||
// return int(*ptr_a_bool) > int(std::any_cast<bool>(b));
|
return false;
|
||||||
// }
|
// return int(*ptr_a_bool) > int(std::any_cast<bool>(b));
|
||||||
// if (ptr_b_bool != nullptr) {
|
}
|
||||||
// a = Any2Bool(a);
|
if (ptr_b_bool != nullptr) {
|
||||||
// return int(std::any_cast<bool>(a)) > int(*ptr_b_bool);
|
a = Any2Bool(a);
|
||||||
// }
|
return int(std::any_cast<bool>(a)) > int(*ptr_b_bool);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
} else
|
} else
|
||||||
throw FatalError("Greater: Type Error", 54);
|
throw FatalError("Greater: Type Error", 54);
|
||||||
@ -444,14 +445,15 @@ bool Less(std::any a, std::any b) {
|
|||||||
return (*ptr_a_string) < (*ptr_b_string);
|
return (*ptr_a_string) < (*ptr_b_string);
|
||||||
else if (((ptr_a_string != nullptr) || (ptr_b_string != nullptr))) {
|
else if (((ptr_a_string != nullptr) || (ptr_b_string != nullptr))) {
|
||||||
if (std::any_cast<NoneType>(&a) && *ptr_b_string != "") return true;
|
if (std::any_cast<NoneType>(&a) && *ptr_b_string != "") return true;
|
||||||
// if (ptr_a_bool != nullptr) {
|
if (ptr_a_bool != nullptr) {
|
||||||
// b = Any2Bool(b);
|
b = Any2Bool(b);
|
||||||
// return int(*ptr_a_bool) < int(std::any_cast<bool>(b));
|
return int(*ptr_a_bool) < int(std::any_cast<bool>(b));
|
||||||
// }
|
}
|
||||||
// if (ptr_b_bool != nullptr) {
|
if (ptr_b_bool != nullptr) {
|
||||||
// a = Any2Bool(a);
|
a = Any2Bool(a);
|
||||||
// return int(std::any_cast<bool>(a)) < int(*ptr_b_bool);
|
return 0;
|
||||||
// }
|
// return int(std::any_cast<bool>(a)) < int(*ptr_b_bool);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
} else
|
} else
|
||||||
throw FatalError("Less: Type Error", 55);
|
throw FatalError("Less: Type Error", 55);
|
||||||
@ -551,14 +553,15 @@ bool GreaterEqual(std::any a, std::any b) {
|
|||||||
return (*ptr_a_string) >= (*ptr_b_string);
|
return (*ptr_a_string) >= (*ptr_b_string);
|
||||||
else if (((ptr_a_string != nullptr) || (ptr_b_string != nullptr))) {
|
else if (((ptr_a_string != nullptr) || (ptr_b_string != nullptr))) {
|
||||||
if (std::any_cast<NoneType>(&b)) return true;
|
if (std::any_cast<NoneType>(&b)) return true;
|
||||||
// if (ptr_a_bool != nullptr) {
|
if (ptr_a_bool != nullptr) {
|
||||||
// b = Any2Bool(b);
|
b = Any2Bool(b);
|
||||||
// return int(*ptr_a_bool) >= int(std::any_cast<bool>(b));
|
return 0;
|
||||||
// }
|
// return int(*ptr_a_bool) >= int(std::any_cast<bool>(b));
|
||||||
// if (ptr_b_bool != nullptr) {
|
}
|
||||||
// a = Any2Bool(a);
|
if (ptr_b_bool != nullptr) {
|
||||||
// return int(std::any_cast<bool>(a)) >= int(*ptr_b_bool);
|
a = Any2Bool(a);
|
||||||
// }
|
return int(std::any_cast<bool>(a)) >= int(*ptr_b_bool);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
} else
|
} else
|
||||||
throw FatalError("GreaterEqual: Type Error", 58);
|
throw FatalError("GreaterEqual: Type Error", 58);
|
||||||
@ -588,14 +591,15 @@ bool LessEqual(std::any a, std::any b) {
|
|||||||
return (*ptr_a_string) <= (*ptr_b_string);
|
return (*ptr_a_string) <= (*ptr_b_string);
|
||||||
else if (((ptr_a_string != nullptr) || (ptr_b_string != nullptr))) {
|
else if (((ptr_a_string != nullptr) || (ptr_b_string != nullptr))) {
|
||||||
if (std::any_cast<NoneType>(&a)) return true;
|
if (std::any_cast<NoneType>(&a)) return true;
|
||||||
// if (ptr_a_bool != nullptr) {
|
if (ptr_a_bool != nullptr) {
|
||||||
// b = Any2Bool(b);
|
b = Any2Bool(b);
|
||||||
// return int(*ptr_a_bool) <= int(std::any_cast<bool>(b));
|
return int(*ptr_a_bool) <= int(std::any_cast<bool>(b));
|
||||||
// }
|
}
|
||||||
// if (ptr_b_bool != nullptr) {
|
if (ptr_b_bool != nullptr) {
|
||||||
// a = Any2Bool(a);
|
a = Any2Bool(a);
|
||||||
// return int(std::any_cast<bool>(a)) <= int(*ptr_b_bool);
|
return false;
|
||||||
// }
|
// return int(std::any_cast<bool>(a)) <= int(*ptr_b_bool);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
} else
|
} else
|
||||||
throw FatalError("LessEqual: Type Error", 59);
|
throw FatalError("LessEqual: Type Error", 59);
|
||||||
|
Reference in New Issue
Block a user