mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-07 10:10:08 +03:00
Add missing int→Variant conversions
(cherry picked from commit bcac96c8c2)
This commit is contained in:
committed by
David Snopek
parent
c5f47b2a4e
commit
e8b6887b36
@@ -268,6 +268,14 @@ Variant::operator int32_t() const {
|
||||
return static_cast<int32_t>(operator int64_t());
|
||||
}
|
||||
|
||||
Variant::operator int16_t() const {
|
||||
return static_cast<int16_t>(operator int64_t());
|
||||
}
|
||||
|
||||
Variant::operator int8_t() const {
|
||||
return static_cast<int8_t>(operator int64_t());
|
||||
}
|
||||
|
||||
Variant::operator uint64_t() const {
|
||||
return static_cast<uint64_t>(operator int64_t());
|
||||
}
|
||||
@@ -276,6 +284,14 @@ Variant::operator uint32_t() const {
|
||||
return static_cast<uint32_t>(operator int64_t());
|
||||
}
|
||||
|
||||
Variant::operator uint16_t() const {
|
||||
return static_cast<uint16_t>(operator int64_t());
|
||||
}
|
||||
|
||||
Variant::operator uint8_t() const {
|
||||
return static_cast<uint8_t>(operator int64_t());
|
||||
}
|
||||
|
||||
Variant::operator double() const {
|
||||
double result;
|
||||
to_type_constructor[FLOAT](&result, _native_ptr());
|
||||
|
||||
Reference in New Issue
Block a user