Return a value in all codepaths.

This commit is contained in:
Relintai 2022-06-07 03:40:24 +02:00
parent 4589a29066
commit 9529c7a5a5
2 changed files with 2 additions and 2 deletions

View File

@ -214,6 +214,8 @@ Variant MMNodeUniversalProperty::get_owner_value(const Vector2 &uv) {
} else if (default_type == DEFAULT_TYPE_IMAGE) { } else if (default_type == DEFAULT_TYPE_IMAGE) {
return to_color(owner->get_property_value(uv)); return to_color(owner->get_property_value(uv));
} }
return Variant();
} }
Variant MMNodeUniversalProperty::get_value_or_zero(const Vector2 &uv, const bool skip_owner_val) { Variant MMNodeUniversalProperty::get_value_or_zero(const Vector2 &uv, const bool skip_owner_val) {

View File

@ -15,7 +15,6 @@ class MMNodeUniversalProperty : public Resource {
public: public:
enum SlotTypes { enum SlotTypes {
SLOT_TYPE_NONE = -1, SLOT_TYPE_NONE = -1,
SLOT_TYPE_IMAGE = 0, SLOT_TYPE_IMAGE = 0,
SLOT_TYPE_INT = 1, SLOT_TYPE_INT = 1,
@ -27,7 +26,6 @@ public:
}; };
enum MMNodeUniversalPropertyDefaultType { enum MMNodeUniversalPropertyDefaultType {
DEFAULT_TYPE_INT = 0, DEFAULT_TYPE_INT = 0,
DEFAULT_TYPE_FLOAT = 1, DEFAULT_TYPE_FLOAT = 1,
DEFAULT_TYPE_VECTOR2 = 2, DEFAULT_TYPE_VECTOR2 = 2,