Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use static constexpr instead of enum class #852

Merged
merged 1 commit into from
Mar 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dart/math/ConfigurationSpace.hpp
Original file line number Diff line number Diff line change
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