Skip to content

Commit 61492b6

Browse files
committed
Move 4661 MSVC warning configuration to CMake
* Add 4661 MSVC warning configuration in CMake * Remove 4661 MSVC warning configuration from `pcl_macros.h` * Remove unused `type_traits` include from `point_types.hpp` * Use `Eigen::Map` in `boundary.h` Signed-off-by: Ramir Sultanov <sumir0@proton.me>
1 parent d2199ca commit 61492b6

5 files changed

Lines changed: 8 additions & 6 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ if(CMAKE_COMPILER_IS_MSVC)
187187
# /MANIFEST:NO") # please, don't disable manifest generation, otherwise crash at start for vs2008
188188

189189
# Disable some warnings
190-
string(APPEND CMAKE_CXX_FLAGS " /wd4800 /wd4521 /wd4251 /wd4275 /wd4305 /wd4355")
190+
# 4661 : no suitable definition provided for explicit template instantiation request
191+
string(APPEND CMAKE_CXX_FLAGS " /wd4800 /wd4521 /wd4251 /wd4275 /wd4305 /wd4355 /wd4661")
191192

192193
# Enable warnings, which are disabled by default (see https://learn.microsoft.com/de-de/cpp/preprocessor/compiler-warnings-that-are-off-by-default)
193194
string(APPEND CMAKE_CXX_FLAGS " /w34265")

common/include/pcl/impl/point_types.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#include <algorithm> // for copy_n, fill_n
5151
#include <cstdint> // for uint8_t, uint32_t
5252
#include <ostream> // for ostream, operator<<
53-
#include <type_traits> // for enable_if_t
5453

5554
// Define all PCL point types
5655
#define PCL_POINT_TYPES \

common/include/pcl/pcl_macros.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@
4949

5050
#if defined _MSC_VER
5151
// 4244 : conversion from 'type1' to 'type2', possible loss of data
52-
// 4661 : no suitable definition provided for explicit template instantiation request
5352
// 4503 : decorated name length exceeded, name was truncated
5453
// 4146 : unary minus operator applied to unsigned type, result still unsigned
55-
#pragma warning (disable: 4018 4244 4267 4521 4251 4661 4305 4503 4146)
54+
#pragma warning (disable: 4018 4244 4267 4521 4251 4305 4503 4146)
5655
#endif
5756

5857
#ifndef _USE_MATH_DEFINES

features/include/pcl/features/boundary.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
#pragma once
4242

4343
#include <pcl/features/feature.h>
44-
#include <pcl/point_types.h> // for pcl::Vector4fMapConst
44+
45+
#include <Eigen/Core>
4546

4647
namespace pcl
4748
{
@@ -160,7 +161,8 @@ namespace pcl
160161
getCoordinateSystemOnPlane (const PointNT &p_coeff,
161162
Eigen::Vector4f &u, Eigen::Vector4f &v)
162163
{
163-
pcl::Vector4fMapConst p_coeff_v = p_coeff.getNormalVector4fMap ();
164+
const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned> p_coeff_v =
165+
p_coeff.getNormalVector4fMap ();
164166
v = p_coeff_v.unitOrthogonal ();
165167
u = p_coeff_v.cross3 (v);
166168
}

tools/boundary_estimation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <pcl/console/print.h>
4444
#include <pcl/console/parse.h>
4545
#include <pcl/console/time.h>
46+
#include <pcl/point_types.h>
4647

4748
using namespace pcl;
4849
using namespace pcl::io;

0 commit comments

Comments
 (0)