Skip to content

Commit 00b12a4

Browse files
committed
memcpy --> std::memcpy
1 parent 7a474c1 commit 00b12a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cpp/open3d/io/file_format/FileXYZ.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ bool WritePointCloudInMemoryToXYZ(unsigned char *&buffer,
145145
}
146146
length = content.length();
147147
buffer = new unsigned char[length]; // we do this for the caller
148-
memcpy(buffer, content.c_str(), length);
148+
std::memcpy(buffer, content.c_str(), length);
149149

150150
reporter.Finish();
151151
return true;

cpp/pybind/io/class_io.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ void pybind_class_io(py::module &m_io) {
183183
const char *dataptr = PYBIND11_BYTES_AS_STRING(bytes.ptr());
184184
auto length = PYBIND11_BYTES_SIZE(bytes.ptr());
185185
auto buffer = new unsigned char[length];
186-
memcpy(buffer, dataptr, length); // copy before releasing GIL
186+
// copy before releasing GIL
187+
std::memcpy(buffer, dataptr, length);
187188
py::gil_scoped_release release;
188189
geometry::PointCloud pcd;
189190
ReadPointCloud(reinterpret_cast<const unsigned char *>(buffer),

0 commit comments

Comments
 (0)