You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-ros/pcl_ros/files/pcl.patch

52 lines
2.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

From bd21be2cb8ec6ad70a282c61b14aa9dd43edf9ff Mon Sep 17 00:00:00 2001
From: Markus Vieth <39675748+mvieth@users.noreply.github.com>
Date: Mon, 21 Jun 2021 19:42:58 +0200
Subject: [PATCH] Use complete namespace for traits members (#330)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This prevents errors like this: error: name is not a member of pcl::detail::traits; did you mean pcl::traits::name?
The error appears for newer PCL versions (everything after commit https://github.com/PointCloudLibrary/pcl/commit/d39d3d3300746b952997e5bd2742dac7482aa5ab), but this change should also be fully compatible with older PCL versions.
---
pcl_ros/include/pcl_ros/point_cloud.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/pcl_ros/point_cloud.h b/pcl_ros/include/pcl_ros/point_cloud.h
index 93df7365..3c57f298 100644
--- a/include/pcl_ros/point_cloud.h
+++ b/include/pcl_ros/point_cloud.h
@@ -23,19 +23,19 @@ namespace pcl
template<typename U> void operator() ()
{
- const char* name = traits::name<PointT, U>::value;
+ const char* name = pcl::traits::name<PointT, U>::value;
std::uint32_t name_length = strlen(name);
stream_.next(name_length);
if (name_length > 0)
memcpy(stream_.advance(name_length), name, name_length);
- std::uint32_t offset = traits::offset<PointT, U>::value;
+ std::uint32_t offset = pcl::traits::offset<PointT, U>::value;
stream_.next(offset);
- std::uint8_t datatype = traits::datatype<PointT, U>::value;
+ std::uint8_t datatype = pcl::traits::datatype<PointT, U>::value;
stream_.next(datatype);
- std::uint32_t count = traits::datatype<PointT, U>::size;
+ std::uint32_t count = pcl::traits::datatype<PointT, U>::size;
stream_.next(count);
}
@@ -49,7 +49,7 @@ namespace pcl
template<typename U> void operator() ()
{
- std::uint32_t name_length = strlen(traits::name<PointT, U>::value);
+ std::uint32_t name_length = strlen(pcl::traits::name<PointT, U>::value);
length += name_length + 13;
}