mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
refactor data/dv & update data/dv-related tests
This commit is contained in:
parent
d6d07f0a3a
commit
827a09b1d0
4 changed files with 34 additions and 58 deletions
|
|
@ -123,13 +123,8 @@ namespace dv {
|
|||
}
|
||||
|
||||
boolean_t value::asBoolean() const {
|
||||
if (type == value_type::boolean) {
|
||||
return val.boolean;
|
||||
} else if (type == value_type::integer) {
|
||||
return val.integer != 0;
|
||||
}
|
||||
throw_type_error(type, value_type::boolean);
|
||||
return false; // unreachable
|
||||
check_type(type, value_type::boolean);
|
||||
return val.boolean;
|
||||
}
|
||||
|
||||
objects::Bytes& value::asBytes() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue