From 226b4c8b5595bbc0a1eb53efe19d3ac11f99276d Mon Sep 17 00:00:00 2001 From: gapry Date: Sat, 30 Nov 2024 15:29:08 +0800 Subject: [PATCH] use c++ copy_n to replace the c library memcpy --- vtkext/private/module/vtkF3DEXRReader.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vtkext/private/module/vtkF3DEXRReader.cxx b/vtkext/private/module/vtkF3DEXRReader.cxx index 4f3e22e2d7..2a8e482716 100644 --- a/vtkext/private/module/vtkF3DEXRReader.cxx +++ b/vtkext/private/module/vtkF3DEXRReader.cxx @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include @@ -32,7 +32,7 @@ class MemStream : public Imf::IStream { if (pos + n <= bufflen) { - memcpy(c, buffer + pos, n); + std::copy_n(buffer + pos, n, c); pos += n; return true; }