diff --git a/map/src/MapWindow/DataView/SplineData.cpp b/map/src/MapWindow/DataView/SplineData.cpp index 47aac841..df6c345b 100644 --- a/map/src/MapWindow/DataView/SplineData.cpp +++ b/map/src/MapWindow/DataView/SplineData.cpp @@ -15,18 +15,8 @@ namespace { glm::vec3 leaveTangent; }; - SatisfactorySave::ArrayProperty& getSplineDataProperty(const SatisfactorySave::PropertyList& properties) { - for (const auto& p : properties) { - if (p->name() == "mSplineData" && p->type() == SatisfactorySave::ArrayProperty::TypeName) { - return dynamic_cast(*p); - } - } - - throw std::runtime_error("mSplineData property missing!"); - } - std::vector getSplineData(const SatisfactorySave::SaveActor& a) { - auto& ap = getSplineDataProperty(a.Properties); + auto& ap = a.Properties.get("mSplineData"); if (ap.arrayType() != SatisfactorySave::StructProperty::TypeName) { throw std::runtime_error("Expect StructProperty!"); }