Skip to content

Commit 86625e4

Browse files
committed
Avoid using FALSE and TRUE in enum
1 parent 6e5387b commit 86625e4

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

dart/utils/mjcf/detail/Compiler.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,23 +180,11 @@ Errors Compiler::read(tinyxml2::XMLElement* element)
180180
const std::string inertiafromgeom
181181
= getAttributeString(element, "inertiafromgeom");
182182
if (inertiafromgeom == "false") {
183-
#if DART_OS_WINDOWS
184183
mInertiaFromGeom = InertiaFromGeom::IFG_FALSE;
185-
#else
186-
mInertiaFromGeom = InertiaFromGeom::FALSE;
187-
#endif
188184
} else if (inertiafromgeom == "true") {
189-
#if DART_OS_WINDOWS
190185
mInertiaFromGeom = InertiaFromGeom::IFG_TRUE;
191-
#else
192-
mInertiaFromGeom = InertiaFromGeom::TRUE;
193-
#endif
194186
} else if (inertiafromgeom == "auto") {
195-
#if DART_OS_WINDOWS
196187
mInertiaFromGeom = InertiaFromGeom::IFG_AUTO;
197-
#else
198-
mInertiaFromGeom = InertiaFromGeom::AUTO;
199-
#endif
200188
} else {
201189
errors.emplace_back(
202190
ErrorCode::ATTRIBUTE_INVALID,

dart/utils/mjcf/detail/Compiler.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,7 @@ class Compiler final
100100
bool mConvexHull{true};
101101
bool mUserThread{true};
102102
bool mFuseStatic{false};
103-
#if DART_OS_WINDOWS
104103
InertiaFromGeom mInertiaFromGeom{InertiaFromGeom::IFG_AUTO};
105-
#else
106-
InertiaFromGeom mInertiaFromGeom{InertiaFromGeom::AUTO};
107-
#endif
108104
Eigen::Vector2i mInertiaGroupRange{Eigen::Vector2i(0, 5)};
109105
};
110106

dart/utils/mjcf/detail/Types.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,9 @@ enum class Integrator
7777

7878
enum class InertiaFromGeom
7979
{
80-
#if DART_OS_WINDOWS
8180
IFG_FALSE,
8281
IFG_TRUE,
8382
IFG_AUTO,
84-
#else
85-
FALSE,
86-
TRUE,
87-
AUTO,
88-
#endif
8983
};
9084

9185
enum class CollisionType

0 commit comments

Comments
 (0)