From 45b471df8b8e53ee01346d9c209be0113af81d1b Mon Sep 17 00:00:00 2001 From: Joe Dong Date: Wed, 30 Aug 2023 10:02:50 +0800 Subject: [PATCH] fixed issue #1 --- src/pyorbbecsdk/frame.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pyorbbecsdk/frame.cpp b/src/pyorbbecsdk/frame.cpp index 3f21c9ff..9a49846e 100644 --- a/src/pyorbbecsdk/frame.cpp +++ b/src/pyorbbecsdk/frame.cpp @@ -243,7 +243,7 @@ void define_frame_set(const py::object& m) { return py::list(); } auto points_size = - static_cast(frame->dataSize() / sizeof(OBPoint)); + static_cast(frame->dataSize() / sizeof(OBPoint)); auto scale = depth_frame->getValueScale(); auto points = reinterpret_cast(frame->data()); if (!points) { @@ -251,7 +251,7 @@ void define_frame_set(const py::object& m) { return py::list(); } py::list result; - for (ssize_t i = 0; i < points_size; ++i) { + for (size_t i = 0; i < points_size; ++i) { auto point = points[i]; point.x *= scale; point.y *= scale; @@ -283,7 +283,7 @@ void define_frame_set(const py::object& m) { if (!frame) { return py::list(); } - auto points_size = static_cast(frame->dataSize() / + auto points_size = static_cast(frame->dataSize() / sizeof(OBColorPoint)); auto scale = depth_frame->getValueScale(); auto points = reinterpret_cast(frame->data()); @@ -292,7 +292,7 @@ void define_frame_set(const py::object& m) { return py::list(); } py::list result; - for (ssize_t i = 0; i < points_size; ++i) { + for (size_t i = 0; i < points_size; ++i) { auto point = points[i]; point.x *= scale; point.y *= scale;