Skip to content

Commit

Permalink
Use static constexpr instead of enum class
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Mar 13, 2017
1 parent 277d2a4 commit 4d38742
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dart/math/ConfigurationSpace.hpp
Expand Up @@ -43,8 +43,8 @@ namespace math {
template <std::size_t Dimension>
struct RealVectorSpace
{
enum : std::size_t { NumDofs = Dimension };
enum : int { NumDofsEigen = Dimension };
static constexpr std::size_t NumDofs = Dimension;
static constexpr int NumDofsEigen = static_cast<int>(Dimension);

using TangentSpace = RealVectorSpace<NumDofs>;

Expand All @@ -63,8 +63,8 @@ using R3Space = RealVectorSpace<3u>;
//==============================================================================
struct SO3Space
{
enum : std::size_t { NumDofs = 3u };
enum : int { NumDofsEigen = 3 };
static constexpr std::size_t NumDofs = 3u;
static constexpr int NumDofsEigen = 3;

using TangentSpace = RealVectorSpace<NumDofs>;

Expand All @@ -78,8 +78,8 @@ struct SO3Space
//==============================================================================
struct SE3Space
{
enum : std::size_t { NumDofs = 6u };
enum : int { NumDofsEigen = 6 };
static constexpr std::size_t NumDofs = 6u;
static constexpr int NumDofsEigen = 6;

using TangentSpace = RealVectorSpace<NumDofs>;

Expand Down

0 comments on commit 4d38742

Please sign in to comment.