This commit is contained in:
MihailRis
2024-03-31 23:05:38 +03:00
parent 48982e3478
commit 8950f4ecd5
9 changed files with 40 additions and 46 deletions
+8
View File
@@ -352,3 +352,11 @@ Value::~Value() {
break;
}
}
Value Value::of(number_u value) {
if (std::holds_alternative<integer_t>(value)) {
return Value(valtype::integer, std::get<integer_t>(value));
} else {
return Value(valtype::number, std::get<number_t>(value));
}
}