Merge pull request #32054 from puthre/variant_ref_optim

Optimized variant reference function.
This commit is contained in:
Rémi Verschelde 2019-09-23 11:36:40 +02:00 committed by GitHub
commit 46f909f8af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;