diff --git a/SHADE_Engine/src/Serialization/SHSerializationHelper.hpp b/SHADE_Engine/src/Serialization/SHSerializationHelper.hpp index f2c4572a..8f1b972c 100644 --- a/SHADE_Engine/src/Serialization/SHSerializationHelper.hpp +++ b/SHADE_Engine/src/Serialization/SHSerializationHelper.hpp @@ -267,22 +267,18 @@ namespace YAML static bool decode(YAML::Node const& node, SHMaterialSpec& rhs) { // Retrieve Shader Asset IDs - if (!node[VERT_SHADER_YAML_TAG.data()]) - return false; - rhs.vertexShader = node[VERT_SHADER_YAML_TAG.data()].as(); - if (!node[FRAG_SHADER_YAML_TAG.data()]) - return false; - rhs.fragShader = node[FRAG_SHADER_YAML_TAG.data()].as(); + if (node[VERT_SHADER_YAML_TAG.data()]) + rhs.vertexShader = node[VERT_SHADER_YAML_TAG.data()].as(); + if (node[FRAG_SHADER_YAML_TAG.data()]) + rhs.fragShader = node[FRAG_SHADER_YAML_TAG.data()].as(); // Retrieve Subpass - if (!node[SUBPASS_YAML_TAG.data()]) - return false; - rhs.subpassName = node[SUBPASS_YAML_TAG.data()].as(); + if (node[SUBPASS_YAML_TAG.data()]) + rhs.subpassName = node[SUBPASS_YAML_TAG.data()].as(); // Retrieve - if (!node[PROPS_YAML_TAG.data()]) - return false; - rhs.properties = node[PROPS_YAML_TAG.data()]; + if (node[PROPS_YAML_TAG.data()]) + rhs.properties = node[PROPS_YAML_TAG.data()]; return true; }