From a9614130c4f071a6acbe02e51361cba64ab27abf Mon Sep 17 00:00:00 2001 From: D Hoyt Date: Wed, 31 Dec 2025 10:08:11 -0500 Subject: [PATCH] Update IccMpeXml.cpp --- IccXML/IccLibXML/IccMpeXml.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/IccXML/IccLibXML/IccMpeXml.cpp b/IccXML/IccLibXML/IccMpeXml.cpp index d0229eed3..4d0465f99 100644 --- a/IccXML/IccLibXML/IccMpeXml.cpp +++ b/IccXML/IccLibXML/IccMpeXml.cpp @@ -1029,25 +1029,29 @@ bool CIccSegmentedCurveXml::ParseXml(xmlNode *pNode, std::string &parseStr) static bool ToXmlCurve(std::string& xml, std::string blanks, icCurveSetCurvePtr pCurve) { if (pCurve->GetType() == icSigSingleSampledCurve) { - CIccSingleSampledeCurveXml* m_ptr = (CIccSingleSampledeCurveXml*)pCurve; + CIccSingleSampledeCurveXml* m_ptr = + static_cast(pCurve); - if (!(m_ptr->ToXml(xml, blanks + " "))) + if (!m_ptr->ToXml(xml, blanks + " ")) return false; } else if (pCurve->GetType() == icSigSegmentedCurve) { - CIccSegmentedCurveXml* m_ptr = (CIccSegmentedCurveXml*)pCurve; + CIccSegmentedCurveXml* m_ptr = + static_cast(pCurve); - if (!(m_ptr->ToXml(xml, blanks + " "))) + if (!m_ptr->ToXml(xml, blanks + " ")) return false; } else if (pCurve->GetType() == icSigSampledCalculatorCurve) { - CIccSampledCalculatorCurveXml* m_ptr = (CIccSampledCalculatorCurveXml*)pCurve; + CIccSampledCalculatorCurveXml* m_ptr = + static_cast(pCurve); - if (!(m_ptr->ToXml(xml, blanks + " "))) + if (!m_ptr->ToXml(xml, blanks + " ")) return false; } - else + else { return false; + } return true; }