mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
refactor
This commit is contained in:
parent
48982e3478
commit
8950f4ecd5
9 changed files with 40 additions and 46 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue