diff --git a/core/math/2d/random_2d.h b/core/math/2d/random_2d.h index eb9b447d..24994972 100644 --- a/core/math/2d/random_2d.h +++ b/core/math/2d/random_2d.h @@ -14,7 +14,7 @@ class Random2D : public Random { public: static Random2D *get_singleton() { return singleton; } - virtual Ref new_instance() const { return memnew(Random2D); } + virtual Ref new_instance() const { return memnew(Random2D); } real_t get_rotation(); Vector2 get_direction(); // Unit vector. diff --git a/core/math/random.h b/core/math/random.h index f97d5f6b..cd7c4a31 100644 --- a/core/math/random.h +++ b/core/math/random.h @@ -14,7 +14,7 @@ class Random : public RandomNumberGenerator { public: static Random *get_singleton() { return singleton; } - virtual Ref new_instance() const { return memnew(Random); } + virtual Ref new_instance() const { return memnew(Random); } uint32_t get_number(); real_t get_value(); diff --git a/core/types/variant_resource.cpp b/core/types/variant_resource.cpp index 228f6b18..f7ff23ae 100644 --- a/core/types/variant_resource.cpp +++ b/core/types/variant_resource.cpp @@ -1,8 +1,8 @@ #include "variant_resource.h" -void VariantResource::set_type(Variant::Type p_type) { +void VariantResource::set_type(int p_type) { const Variant::Type prev_type = type; - type = p_type; + type = static_cast(p_type); // Convert previous value to a new type, if possible. if (prev_type != Variant::NIL) { value = convert(value, type); diff --git a/core/types/variant_resource.h b/core/types/variant_resource.h index 861e2258..4fbeb09b 100644 --- a/core/types/variant_resource.h +++ b/core/types/variant_resource.h @@ -18,7 +18,7 @@ class VariantResource : public Resource { PropertyInfo pi; public: - void set_type(Variant::Type p_type); + void set_type(int p_type); int get_type() const { return type; } void set_value(const Variant &p_value) { set(pi.name, p_value); } diff --git a/doc/LinkedList.xml b/doc/LinkedList.xml index 40bbb5f0..13592383 100644 --- a/doc/LinkedList.xml +++ b/doc/LinkedList.xml @@ -212,7 +212,7 @@ - Sorts the list in alphabetical order if the list contains [String]s. If the list contains nodes with different types of values, these are sorted according to the order of [enum @GlobalScope.Variant.Type]. + Sorts the list in alphabetical order if the list contains [String]s. If the list contains nodes with different types of values, these are sorted according to the order of type in [Variant].