1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits.

This commit is contained in:
Juan Linietsky
2020-02-12 14:24:06 -03:00
parent 4aa31a2851
commit cf8c679a23
89 changed files with 337 additions and 287 deletions

View File

@@ -1248,6 +1248,14 @@ Variant::operator uint64_t() const {
}
}
Variant::operator ObjectID() const {
if (type == INT) {
return ObjectID(_data._int);
} else {
return ObjectID();
}
}
#ifdef NEED_LONG_INT
Variant::operator signed long() const {
@@ -2193,6 +2201,11 @@ Variant::Variant(double p_double) {
_data._real = p_double;
}
Variant::Variant(const ObjectID &p_id) {
type = INT;
_data._int = p_id;
}
Variant::Variant(const StringName &p_string) {
type = STRING;