-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix function signature mismatching. #1625
Fix function signature mismatching. #1625
Conversation
@@ -1365,6 +1366,36 @@ TEST (PCL, Locale) | |||
#endif | |||
} | |||
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
TEST (PCL, AutoIO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're working with a PointCloud<PointT>
type, i would recommend you write a typed test case like this but for all point types. The macro is PCL_POINT_TYPES
.
I have implemented your suggestions, but there are errors arising when loading a .ply file for some point types. These errors are on functions that load the ply file, not on pcl::io::save() or pcl::io::load() that only route the call accordingly to a file extension. For now I would suggest simply comment out the ply tests, as that doesn't invalidates nor is directly related to the bug being fixed by this PR. |
@@ -1365,6 +1366,43 @@ TEST (PCL, Locale) | |||
#endif | |||
} | |||
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
template <typename T> class AutoIOTest : public testing::Test { }; | |||
typedef ::testing::Types<BOOST_PP_SEQ_ENUM (PCL_POINT_TYPES)> PCLPointTypes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to
typedef ::testing::Types<BOOST_PP_SEQ_ENUM (PCL_XYZ_POINT_TYPES PCL_NORMAL_POINT_TYPES)> PCLXyzNormalPointTypes;
TYPED_TEST_CASE (AutoIOTest, PCLXyzNormalPointTypes);
Implement the change on the point types I just mentioned, uncomment the PLY tests, squash the commits and I think we're good to go. |
@jspricke Speaking of ABI breakage, what about this PR. We're changing the function signature, although it was wrong and not compiling so... Just want to be sure this should go on 1.8.1 :) |
The function template pcl::io::save has a distinct signature on declaration (pcl/io/auto_io.h) and definition (pcl/io/impl/auto_io.hpp). On fixing that a bug popup on ifs_io.h. The conversion order between PointCloud<> to/from PCLPointCloud2 was backward.
@SergioRAgostinho I have implemented the changes and squash. |
@SergioRAgostinho @jspricke As of API breakage, yes that could be a problem. Although in this function signature, as far as could search, the API has never worked to begin with. If I'm not wrong, the function was added in ab0ecd but only declaration, without a template function definition. The definition was added in a6f157, but already with the current argument mismatch. |
Thanks! @VictorLamoine @taketwo opinions on this? 1.8.1 or 1.9.0? |
|
Agree. |
Fix #1624
The function template pcl::io::save has a distinct signature on
declaration (pcl/io/auto_io.h) and definition (pcl/io/impl/auto_io.hpp).
On fixing that a bug popup on ifs_io.h. The conversion order between
PointCloud<> to/from PCLPointCloud2 was backward.