Skip to content

Commit c9bf422

Browse files
committed
Fix usage of GCC extension before C++23
1 parent e400b23 commit c9bf422

File tree

4 files changed

+2
-17
lines changed

4 files changed

+2
-17
lines changed

gtsam/discrete/DiscreteBayesNet.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,8 @@ DiscreteValues DiscreteBayesNet::optimize() const {
6060

6161
DiscreteValues DiscreteBayesNet::optimize(DiscreteValues result) const {
6262
// solve each node in turn in topological sort order (parents first)
63-
#ifdef _MSC_VER
6463
#pragma message("DiscreteBayesNet::optimize (deprecated) does not compute MPE!")
65-
#else
66-
#warning "DiscreteBayesNet::optimize (deprecated) does not compute MPE!"
67-
#endif
64+
6865
for (auto conditional : boost::adaptors::reverse(*this))
6966
conditional->solveInPlace(&result);
7067
return result;

gtsam/slam/BearingFactor.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111

1212
#pragma once
1313

14-
#ifdef _MSC_VER
1514
#pragma message("BearingFactor is now an ExpressionFactor in SAM directory")
16-
#else
17-
#warning "BearingFactor is now an ExpressionFactor in SAM directory"
18-
#endif
1915

2016

2117
#include <gtsam/sam/BearingFactor.h>

gtsam/slam/BearingRangeFactor.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111

1212
#pragma once
1313

14-
#ifdef _MSC_VER
1514
#pragma message( \
1615
"BearingRangeFactor is now an ExpressionFactor in SAM directory")
17-
#else
18-
#warning "BearingRangeFactor is now an ExpressionFactor in SAM directory"
19-
#endif
16+
2017

2118
#include <gtsam/sam/BearingRangeFactor.h>

gtsam/slam/RangeFactor.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@
1111

1212
#pragma once
1313

14-
#ifdef _MSC_VER
1514
#pragma message("RangeFactor is now an ExpressionFactor in SAM directory")
16-
#else
17-
#warning "RangeFactor is now an ExpressionFactor in SAM directory"
18-
#endif
19-
2015

2116
#include <gtsam/sam/RangeFactor.h>
2217

0 commit comments

Comments
 (0)