Skip to content

Commit

Permalink
Merge pull request #5516 from mvieth/fix_header_deprecation_macro
Browse files Browse the repository at this point in the history
Fix problem in header deprecation macro
  • Loading branch information
mvieth authored Nov 19, 2022
2 parents 0cf4f91 + 90afd34 commit 58f9cfb
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 2 deletions.
2 changes: 2 additions & 0 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ set(incs
include/pcl/types.h
include/pcl/point_cloud.h
include/pcl/point_struct_traits.h
include/pcl/point_traits.h
include/pcl/type_traits.h
include/pcl/point_types_conversion.h
include/pcl/point_representation.h
Expand All @@ -79,6 +80,7 @@ set(incs
include/pcl/PointIndices.h
include/pcl/register_point_struct.h
include/pcl/conversions.h
include/pcl/make_shared.h
)

set(common_incs
Expand Down
42 changes: 42 additions & 0 deletions common/include/pcl/make_shared.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2019-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* 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;
* 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
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#pragma once

PCL_DEPRECATED_HEADER(1, 15, "Use <pcl/memory.h> instead.")

#include <pcl/memory.h>

2 changes: 1 addition & 1 deletion common/include/pcl/pcl_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

// Macro for emitting pragma warning for deprecated headers
#if (defined (__GNUC__) || defined(__clang__))
#define _PCL_DEPRECATED_HEADER_IMPL(Message) PCL_PRAGMA (GCC warning Message)
#define _PCL_DEPRECATED_HEADER_IMPL(Message) PCL_PRAGMA (message Message)
#elif _MSC_VER
#define _PCL_DEPRECATED_HEADER_IMPL(Message) PCL_PRAGMA (warning (Message))
#else
Expand Down
43 changes: 43 additions & 0 deletions common/include/pcl/point_traits.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2012, Willow Garage, Inc.
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* 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;
* 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
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/

#pragma once

PCL_DEPRECATED_HEADER(1, 15, "Use <pcl/type_traits.h> instead.")

#include <pcl/type_traits.h>
2 changes: 1 addition & 1 deletion visualization/include/pcl/visualization/vtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* All rights reserved
*/

PCL_DEPRECATED_HEADER(1, 14, "Use required vtk includes instead.")
PCL_DEPRECATED_HEADER(1, 15, "Use required vtk includes instead.")

0 comments on commit 58f9cfb

Please sign in to comment.