From 9529c7a5a5705000a59c0fa3c78c5e908908ada8 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 7 Jun 2022 03:40:24 +0200 Subject: [PATCH] Return a value in all codepaths. --- modules/material_maker/nodes/mm_node_universal_property.cpp | 2 ++ modules/material_maker/nodes/mm_node_universal_property.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/material_maker/nodes/mm_node_universal_property.cpp b/modules/material_maker/nodes/mm_node_universal_property.cpp index 6462ebbd1..323fe5799 100644 --- a/modules/material_maker/nodes/mm_node_universal_property.cpp +++ b/modules/material_maker/nodes/mm_node_universal_property.cpp @@ -214,6 +214,8 @@ Variant MMNodeUniversalProperty::get_owner_value(const Vector2 &uv) { } else if (default_type == DEFAULT_TYPE_IMAGE) { return to_color(owner->get_property_value(uv)); } + + return Variant(); } Variant MMNodeUniversalProperty::get_value_or_zero(const Vector2 &uv, const bool skip_owner_val) { diff --git a/modules/material_maker/nodes/mm_node_universal_property.h b/modules/material_maker/nodes/mm_node_universal_property.h index 5a0386cd9..7a451e038 100644 --- a/modules/material_maker/nodes/mm_node_universal_property.h +++ b/modules/material_maker/nodes/mm_node_universal_property.h @@ -15,7 +15,6 @@ class MMNodeUniversalProperty : public Resource { public: enum SlotTypes { - SLOT_TYPE_NONE = -1, SLOT_TYPE_IMAGE = 0, SLOT_TYPE_INT = 1, @@ -27,7 +26,6 @@ public: }; enum MMNodeUniversalPropertyDefaultType { - DEFAULT_TYPE_INT = 0, DEFAULT_TYPE_FLOAT = 1, DEFAULT_TYPE_VECTOR2 = 2,