From a4c809b604ff0238b6847bb25ed0d07f28ede8e8 Mon Sep 17 00:00:00 2001 From: Andrea Ponza Date: Fri, 5 Jul 2019 11:55:41 +0200 Subject: [PATCH] rename test for make_shared and improve make_shared doc --- common/include/pcl/impl/point_types.hpp | 2 +- common/include/pcl/make_shared.h | 5 ++++- test/common/CMakeLists.txt | 2 +- test/common/{test_make_shared.cpp => test_type_traits.cpp} | 0 4 files changed, 6 insertions(+), 3 deletions(-) rename test/common/{test_make_shared.cpp => test_type_traits.cpp} (100%) diff --git a/common/include/pcl/impl/point_types.hpp b/common/include/pcl/impl/point_types.hpp index 43ea7f6114b..822f89f4465 100644 --- a/common/include/pcl/impl/point_types.hpp +++ b/common/include/pcl/impl/point_types.hpp @@ -27,7 +27,7 @@ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN diff --git a/common/include/pcl/make_shared.h b/common/include/pcl/make_shared.h index ab730974e2d..737a73a9c2a 100644 --- a/common/include/pcl/make_shared.h +++ b/common/include/pcl/make_shared.h @@ -53,7 +53,10 @@ namespace pcl #ifdef DOXYGEN_ONLY /** - * \brief Returns a boost::shared_ptr regardless of type T's allocation policy + * \brief Returns a boost::shared_ptr compliant with type T's allocation policy. + * + * boost::allocate_shared or boost::make_shared will be invoked in case T has or + * doesn't have a custom allocator, respectively. * * \see pcl::has_custom_allocator, PCL_MAKE_ALIGNED_OPERATOR_NEW * \tparam T Type of the object to create a boost::shared_ptr of diff --git a/test/common/CMakeLists.txt b/test/common/CMakeLists.txt index 1e5dc6eff54..b4665b1e655 100644 --- a/test/common/CMakeLists.txt +++ b/test/common/CMakeLists.txt @@ -35,7 +35,7 @@ PCL_ADD_TEST(common_bearing_angle_image test_bearing_angle_image FILES test_bear PCL_ADD_TEST(common_point_type_conversion test_common_point_type_conversion FILES test_point_type_conversion.cpp LINK_WITH pcl_gtest pcl_common) PCL_ADD_TEST(common_colors test_colors FILES test_colors.cpp LINK_WITH pcl_gtest pcl_common) -PCL_ADD_TEST(common_make_shared test_make_shared FILES test_make_shared.cpp LINK_WITH pcl_gtest pcl_common) +PCL_ADD_TEST(common_type_traits test_type_traits FILES test_type_traits.cpp LINK_WITH pcl_gtest pcl_common) if(BUILD_io) PCL_ADD_TEST(common_centroid test_centroid FILES test_centroid.cpp LINK_WITH pcl_gtest pcl_io ARGUMENTS "${PCL_SOURCE_DIR}/test/bun0.pcd") diff --git a/test/common/test_make_shared.cpp b/test/common/test_type_traits.cpp similarity index 100% rename from test/common/test_make_shared.cpp rename to test/common/test_type_traits.cpp