Skip to content

Commit

Permalink
Restore Mono support
Browse files Browse the repository at this point in the history
  • Loading branch information
Xrayez committed Mar 7, 2021
1 parent 200d7c0 commit 6c93c9b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/math/2d/random_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Random2D : public Random {

public:
static Random2D *get_singleton() { return singleton; }
virtual Ref<Random> new_instance() const { return memnew(Random2D); }
virtual Ref<Reference> new_instance() const { return memnew(Random2D); }

real_t get_rotation();
Vector2 get_direction(); // Unit vector.
Expand Down
2 changes: 1 addition & 1 deletion core/math/random.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Random : public RandomNumberGenerator {

public:
static Random *get_singleton() { return singleton; }
virtual Ref<Random> new_instance() const { return memnew(Random); }
virtual Ref<Reference> new_instance() const { return memnew(Random); }

uint32_t get_number();
real_t get_value();
Expand Down
4 changes: 2 additions & 2 deletions core/types/variant_resource.cpp
Original file line number Diff line number Diff line change
@@ -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<Variant::Type>(p_type);
// Convert previous value to a new type, if possible.
if (prev_type != Variant::NIL) {
value = convert(value, type);
Expand Down
2 changes: 1 addition & 1 deletion core/types/variant_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
2 changes: 1 addition & 1 deletion doc/LinkedList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
<return type="void">
</return>
<description>
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].
</description>
</method>
<method name="swap">
Expand Down

0 comments on commit 6c93c9b

Please sign in to comment.