ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits.
This commit is contained in:
parent
4aa31a2851
commit
cf8c679a23
89 changed files with 337 additions and 287 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue