Skip to content

Commit

Permalink
Merge branch 'bugfix/linux_build' into 'o3r/main-next'
Browse files Browse the repository at this point in the history
fix linux build for instrinsic param changes

See merge request syntron/support/csr/ifm3d/ifm3d!155
  • Loading branch information
inbangsa committed Sep 8, 2022
2 parents c60e2ab + 5e7d3fc commit bb2366c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/framegrabber/include/ifm3d/fg/organizer_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ namespace ifm3d
*/
template <typename T>
ifm3d::Buffer
create_buffer_from_vector(std::vector<T>& vec)
create_buffer_from_vector(const std::vector<T>& vec)
{
ifm3d::Buffer buf =
Buffer(vec.size(),
Expand All @@ -119,11 +119,11 @@ namespace ifm3d
*/
template <typename T>
ifm3d::Buffer
create_buffer_from_struct(T& struct_object)
create_buffer_from_struct(const T& struct_object)
{
ifm3d::Buffer buf =
Buffer(sizeof(T), 1, 1, ifm3d::pixel_format::FORMAT_8U);
uint8_t* start = reinterpret_cast<uint8_t*>(&struct_object);
const uint8_t* start = reinterpret_cast<const uint8_t*>(&struct_object);
auto ptr = buf.ptr<uint8_t>(0);
std::copy(start, start + sizeof(T), ptr);
return buf;
Expand All @@ -133,7 +133,7 @@ namespace ifm3d
*/
template <typename T>
T
convert_buffer_to_struct(ifm3d::Buffer& buf)
convert_buffer_to_struct(const ifm3d::Buffer& buf)
{
T struct_object;
auto ptr = buf.ptr<uint8_t>(0);
Expand Down

0 comments on commit bb2366c

Please sign in to comment.