xmloff/source/draw/ximpstyl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bff3d755c8c11721054f4ff40a3d5f723b0c6b96
Author:     Kukee Thoo <kukeet...@proton.me>
AuthorDate: Tue Mar 11 17:22:18 2025 +0100
Commit:     Hossein <hoss...@libreoffice.org>
CommitDate: Tue Mar 11 20:57:26 2025 +0100

    tdf#163691 Use std::copy() instead of memcpy()
    
    Change-Id: I55df00e2625cf42a7e2662850e8cc272ceb70152
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182787
    Tested-by: Jenkins
    Reviewed-by: Hossein   <hoss...@libreoffice.org>

diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 28beb4dff118..3e0d98bfa6ed 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -172,7 +172,7 @@ XMLDrawingPageStyleContext::XMLDrawingPageStyleContext(
     size_t size(1); // for the -1 entry
     for (ContextID_Index_Pair const* pTemp(pContextIDs); pTemp->nContextID != 
-1; ++size, ++pTemp);
     m_pContextIDs.reset(new ContextID_Index_Pair[size]);
-    std::memcpy(m_pContextIDs.get(), pContextIDs, size * 
sizeof(ContextID_Index_Pair));
+    std::copy(pContextIDs, pContextIDs + size, m_pContextIDs.get());
 }
 
 SdXMLDrawingPageStyleContext::SdXMLDrawingPageStyleContext(

Reply via email to