Skip to content

Commit 1c38726

Browse files
committed
Remove cmake options MRPT_ALWAYS_CHECKS_DEBUG
1 parent 32604a4 commit 1c38726

File tree

8 files changed

+13
-38
lines changed

8 files changed

+13
-38
lines changed

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,6 @@ include(${MRPT_SOURCE_DIR}/cmakemodules/process_emscripten_embedded_files.cmake
238238
# OPTIONS
239239
#The options for the user when using "cmakesetup" or "ccmake":
240240
# ---------------------------------------------------------------------------
241-
option(MRPT_ALWAYS_CHECKS_DEBUG "Additional checks even in Release" "OFF")
242-
mark_as_advanced(FORCE MRPT_ALWAYS_CHECKS_DEBUG)
243-
option(MRPT_ALWAYS_CHECKS_DEBUG_MATRICES "Additional checks even in Release (Only in matrix classes)" "OFF")
244-
mark_as_advanced(FORCE MRPT_ALWAYS_CHECKS_DEBUG_MATRICES)
245-
246241
# Include Asian fonts in CMRPTCanvas ?
247242
set( MRPT_HAS_ASIAN_FONTS ON CACHE BOOL "Enable Asian fonts in CMRPTCanvas (increases library size).")
248243

cmakemodules/script_declare_defines.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ macro(CREATE_CMAKE_MRPT_DEFINE defName)
99
endif()
1010
endmacro()
1111

12-
CREATE_CMAKE_MRPT_DEFINE(MRPT_ALWAYS_CHECKS_DEBUG)
13-
CREATE_CMAKE_MRPT_DEFINE(MRPT_ALWAYS_CHECKS_DEBUG_MATRICES)
1412
CREATE_CMAKE_MRPT_DEFINE(MRPT_HAS_BUMBLEBEE)
1513
CREATE_CMAKE_MRPT_DEFINE(MRPT_HAS_SVS)
1614
CREATE_CMAKE_MRPT_DEFINE(MRPT_HAS_ASIAN_FONTS)

doc/source/compiling.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ For all platforms/compilers:
199199
- ``MRPT_WITH_KINECT``: By default ON. Uncheck if you don’t have the required dependencies (read above for your OS).
200200
- ``BUILD_SHARED_LIBS``: Build static libraries if set to OFF, or dynamic libraries (.so/.dll) otherwise. Default is ON, and it’s strongly recommended to always use shared libs unless you have special need for static ones.
201201
- ``MRPT_EIGEN_USE_EMBEDDED_VERSION``: By default O, instructs MRPT to use the Eigen headers in MRPT/otherlibs/eigen3/. Uncheck if you have Eigen installed in the system and it’s visible through pkg-config. It’s recommended to uncheck this option if you have eigen3 installed in your system (today, eigen3 it’s not yet in any distro repository, that’s why it’s ON by default).
202-
- ``MRPT_ALWAYS_CHECKS_DEBUG``: If set to ON, additional security checks will be performed at run-time in many classes. Default is OFF.
203-
- ``MRPT_ALWAYS_CHECKS_DEBUG_MATRICES``: If set to ON, additional security checks will be performed at run-time in several Matrix operations. Default is ON.
204202
- ``MRPT_ENABLE_EMBEDDED_ENABLED_PROFILER``: If enabled, all code blocks within macros "MRPT_BEGIN/MRPT_END" will be profiled and the statistics dumped to the console at the end of execution of any program. Default is OFF.
205203
- ``MRPT_HAS_ASIAN_FONTS``: Enables Asian fonts in mrpt::img::CCanvas (see this page), but increases library size by 1.5Mb. Default is ON.
206204
- ``MRPT_HAS_SVS``: To enable integration of the Videre SVS libraries to interface their stereo cameras. You’ll need the vendor libraries installed in the system before to enable this option. After setting this option to “ON”, the new configuration fields “SVS_ROOT_DIR” will appear and will be tried to be set pointing to the directory where the library is (As of Aug/2010, this option only works in GNU/Linux).

libs/bayes/include/mrpt/bayes/CKalmanFilterCapable_impl.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -781,15 +781,6 @@ void CKalmanFilterCapable<VEH_SIZE, OBS_SIZE, FEAT_SIZE, ACT_SIZE, KFTYPE>::runO
781781
// It is symmetric
782782
m_pkk(q, k) = m_pkk(k, q);
783783
}
784-
785-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
786-
if (m_pkk(k, k) < 0)
787-
{
788-
m_pkk.saveToTextFile("Pkk_err.txt");
789-
mrpt::io::vectorToTextFile(Kij, "Kij.txt");
790-
ASSERT_(m_pkk(k, k) > 0);
791-
}
792-
#endif
793784
}
794785
}
795786

libs/img/src/CImage.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ unsigned char* CImage::operator()(unsigned int ucol, unsigned int urow, unsigned
444444
{
445445
#if MRPT_HAS_OPENCV
446446

447-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
447+
#if defined(_DEBUG)
448448
MRPT_START
449449
#endif
450450

@@ -453,7 +453,7 @@ unsigned char* CImage::operator()(unsigned int ucol, unsigned int urow, unsigned
453453
const auto row = static_cast<int>(urow);
454454
const auto channel = static_cast<int>(uchannel);
455455

456-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
456+
#if defined(_DEBUG)
457457
ASSERT_(m_impl && !m_impl->img.empty());
458458
if (row >= m_impl->img.rows || col >= m_impl->img.cols || channel >= m_impl->img.channels())
459459
{
@@ -465,7 +465,7 @@ unsigned char* CImage::operator()(unsigned int ucol, unsigned int urow, unsigned
465465
#endif
466466
auto p = (&m_impl->img.at<uint8_t>(row, m_impl->img.channels() * col)) + channel;
467467
return const_cast<unsigned char*>(p);
468-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
468+
#if defined(_DEBUG)
469469
MRPT_END
470470
#endif
471471

@@ -1091,7 +1091,7 @@ void CImage::setPixel(int x, int y, size_t color)
10911091
{
10921092
#if MRPT_HAS_OPENCV
10931093

1094-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
1094+
#if defined(_DEBUG)
10951095
MRPT_START
10961096
#endif
10971097

@@ -1109,7 +1109,7 @@ void CImage::setPixel(int x, int y, size_t color)
11091109
}
11101110
else
11111111
{
1112-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
1112+
#if defined(_DEBUG)
11131113
ASSERT_(img.channels() == 3);
11141114
#endif
11151115
auto* dest = &img.ptr<uint8_t>(y)[3 * x];
@@ -1121,7 +1121,7 @@ void CImage::setPixel(int x, int y, size_t color)
11211121
}
11221122
}
11231123

1124-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
1124+
#if defined(_DEBUG)
11251125
MRPT_END
11261126
#endif
11271127

libs/maps/src/maps/COccupancyGridMap2D_common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ void COccupancyGridMap2D::resizeGrid(
280280

281281
for (size_t y = 0; y < m_size_y; y++)
282282
{
283-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
283+
#if defined(_DEBUG)
284284
assert(dest_ptr + row_size - 1 <= &new_map[new_map.size() - 1]);
285285
assert(src_ptr + row_size - 1 <= &m_map[m_map.size() - 1]);
286286
#endif

libs/maps/src/maps/COccupancyGridMap2D_insert.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ bool COccupancyGridMap2D::internal_insertObservation(
131131
const float px = d2f(laserPose.x());
132132
const float py = d2f(laserPose.y());
133133

134-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
134+
#if defined(_DEBUG)
135135
MRPT_CHECK_NORMAL_NUMBER(px);
136136
MRPT_CHECK_NORMAL_NUMBER(py);
137137
#endif
@@ -467,7 +467,7 @@ bool COccupancyGridMap2D::internal_insertObservation(
467467
P2.cx = x2idx(P2.x);
468468
P2.cy = y2idx(P2.y);
469469

470-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
470+
#if defined(_DEBUG)
471471
// The x> comparison implicitly holds if x<0
472472
ASSERT_(
473473
static_cast<unsigned int>(P0.cx) < m_size_x &&
@@ -692,7 +692,7 @@ bool COccupancyGridMap2D::internal_insertObservation(
692692
P2.cx = x2idx(P2.x);
693693
P2.cy = y2idx(P2.y);
694694

695-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
695+
#if defined(_DEBUG)
696696
// The x> comparison implicitly holds if x<0
697697
ASSERT_(
698698
static_cast<unsigned int>(P1.cx) < m_size_x &&
@@ -801,7 +801,7 @@ bool COccupancyGridMap2D::internal_insertObservation(
801801
px = d2f(laserPose.x());
802802
py = d2f(laserPose.y());
803803

804-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
804+
#if defined(_DEBUG)
805805
MRPT_CHECK_NORMAL_NUMBER(px);
806806
MRPT_CHECK_NORMAL_NUMBER(py);
807807
#endif
@@ -951,7 +951,7 @@ bool COccupancyGridMap2D::internal_insertObservation(
951951
P2.cx = x2idx(P2.x);
952952
P2.cy = y2idx(P2.y);
953953

954-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
954+
#if defined(_DEBUG)
955955
// The x> comparison implicitly holds if x<0
956956
ASSERT_(
957957
static_cast<unsigned int>(P0.cx) < m_size_x &&
@@ -1173,7 +1173,7 @@ bool COccupancyGridMap2D::internal_insertObservation(
11731173
P2.cx = x2idx(P2.x);
11741174
P2.cy = y2idx(P2.y);
11751175

1176-
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
1176+
#if defined(_DEBUG)
11771177
// The x> comparison implicitly holds if x<0
11781178
ASSERT_(
11791179
static_cast<unsigned int>(P1.cx) < m_size_x &&

parse-files/config.h.in

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212

1313
// clang-format off
1414

15-
/** If defined, security checks (ASSERT_'s) will be performed in many MRPT
16-
* classes even
17-
* if "_DEBUG" is not declared, which is then the default behavior.
18-
*/
19-
#define MRPT_ALWAYS_CHECKS_DEBUG ${CMAKE_MRPT_ALWAYS_CHECKS_DEBUG}
20-
#define MRPT_ALWAYS_CHECKS_DEBUG_MATRICES ${CMAKE_MRPT_ALWAYS_CHECKS_DEBUG_MATRICES}
21-
2215
/** MRPT_BUILT_AS_DLL is defined only if MRPT has been built
2316
* as a shared library (.dll/.so) vs. a static library (.lib/.a).
2417
* Additionally, MRPT_EXPORTS will be defined only when compiling

0 commit comments

Comments
 (0)