fix: missing None in Any2Int
This commit is contained in:
@ -21,9 +21,13 @@ inline ZYM::int2048 Any2Int(const std::any &value) {
|
|||||||
str = integer_part;
|
str = integer_part;
|
||||||
}
|
}
|
||||||
return std::move(ZYM::int2048(str));
|
return std::move(ZYM::int2048(str));
|
||||||
} else
|
} else if (auto ptr = std::any_cast<NoneType>(&value))
|
||||||
|
return std::move(ZYM::int2048(0));
|
||||||
|
else {
|
||||||
|
std::cerr << value.type().name() << std::endl;
|
||||||
throw FatalError("Any2Int2048: unknown type");
|
throw FatalError("Any2Int2048: unknown type");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
double Any2Float(const std::any &value) {
|
double Any2Float(const std::any &value) {
|
||||||
if (auto ptr = std::any_cast<double>(&value))
|
if (auto ptr = std::any_cast<double>(&value))
|
||||||
|
Reference in New Issue
Block a user