Skip to content

Commit

Permalink
Change the deprecated C++ enum math to constexprs
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfFan committed Dec 12, 2024
1 parent 137a503 commit d8e4125
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gtsam/base/ProductLieGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class ProductLieGroup: public std::pair<G, H> {
typedef std::pair<G, H> Base;

protected:
enum {dimension1 = traits<G>::dimension};
enum {dimension2 = traits<H>::dimension};
constexpr static const size_t dimension1 = traits<G>::dimension;
constexpr static const size_t dimension2 = traits<H>::dimension;

public:
/// Default constructor yields identity
Expand Down
6 changes: 3 additions & 3 deletions gtsam/geometry/BearingRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ struct BearingRange {
R range_;

public:
enum { dimB = traits<B>::dimension };
enum { dimR = traits<R>::dimension };
enum { dimension = dimB + dimR };
constexpr static const size_t dimB = traits<B>::dimension;
constexpr static const size_t dimR = traits<R>::dimension;
constexpr static const size_t dimension = dimB + dimR;

/// @name Standard Constructors
/// @{
Expand Down

0 comments on commit d8e4125

Please sign in to comment.