Merge pull request #32054 from puthre/variant_ref_optim
Optimized variant reference function.
This commit is contained in:
commit
46f909f8af
1 changed files with 9 additions and 1 deletions
|
@ -910,7 +910,15 @@ bool Variant::is_one() const {
|
|||
|
||||
void Variant::reference(const Variant &p_variant) {
|
||||
|
||||
clear();
|
||||
switch (type) {
|
||||
case NIL:
|
||||
case BOOL:
|
||||
case INT:
|
||||
case REAL:
|
||||
break;
|
||||
default:
|
||||
clear();
|
||||
}
|
||||
|
||||
type = p_variant.type;
|
||||
|
||||
|
|
Loading…
Reference in a new issue