Skip to content

Commit 45ea86c

Browse files
committed
clang-tidy fixes: use uint8_t enums
1 parent 5067dbb commit 45ea86c

File tree

11 files changed

+16
-16
lines changed

11 files changed

+16
-16
lines changed

core/include/moveit/task_constructor/cost_terms.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class CostTerm
7070
class TrajectoryCostTerm : public CostTerm
7171
{
7272
public:
73-
enum class Mode
73+
enum class Mode : uint8_t
7474
{
7575
AUTO /* TRAJECTORY, or START_INTERFACE if no trajectory is given */,
7676
START_INTERFACE,

core/include/moveit/task_constructor/stage.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ MOVEIT_CLASS_FORWARD(RobotTrajectory);
7272
namespace moveit {
7373
namespace task_constructor {
7474

75-
enum InterfaceFlag
75+
enum InterfaceFlag : uint8_t
7676
{
7777
READS_START = 0x01,
7878
READS_END = 0x02,
@@ -155,7 +155,7 @@ class Stage
155155
*
156156
* INTERFACE takes precedence over PARENT.
157157
*/
158-
enum PropertyInitializerSource
158+
enum PropertyInitializerSource : uint8_t
159159
{ // TODO: move to property.cpp
160160
DEFAULT = 0,
161161
MANUAL = 1,
@@ -293,7 +293,7 @@ class PropagatingEitherWay : public ComputeBase
293293
PRIVATE_CLASS(PropagatingEitherWay)
294294
PropagatingEitherWay(const std::string& name = "propagating either way");
295295

296-
enum Direction
296+
enum Direction : uint8_t
297297
{
298298
AUTO = 0x00, // auto-derive direction from context
299299
FORWARD = 0x01, // propagate forward only

core/include/moveit/task_constructor/stages/connect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Connect : public Connecting
6767
bool compatible(const InterfaceState& from_state, const InterfaceState& to_state) const override;
6868

6969
public:
70-
enum MergeMode
70+
enum MergeMode : uint8_t
7171
{
7272
SEQUENTIAL = 0,
7373
WAYPOINTS = 1

core/include/moveit/task_constructor/stages/generate_random_pose.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class GenerateRandomPose : public GeneratePose
5757
/** Function signature for pose dimension samplers.
5858
* The input parameter is the seed, the returned value is the sampling result. */
5959
using PoseDimensionSampler = std::function<double(double)>;
60-
enum PoseDimension
60+
enum PoseDimension : uint8_t
6161
{
6262
X,
6363
Y,

core/include/moveit/task_constructor/storage.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class InterfaceState
8080
friend class ContainerBasePrivate; // allow setting priority_ for pruning
8181

8282
public:
83-
enum Status
83+
enum Status : uint8_t
8484
{
8585
ENABLED, // state is actively considered during planning
8686
ARMED, // disabled state in a Connecting interface that will become re-enabled with a new opposite state
@@ -197,12 +197,12 @@ class Interface : public ordered<InterfaceState*>
197197
const InterfaceState* operator->() const noexcept { return base_type::const_iterator::operator*(); }
198198
};
199199

200-
enum Direction
200+
enum Direction : uint8_t
201201
{
202202
FORWARD,
203203
BACKWARD,
204204
};
205-
enum Update
205+
enum Update : uint8_t
206206
{
207207
STATUS = 1 << 0,
208208
PRIORITY = 1 << 1,

core/test/test_container.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
using namespace moveit::task_constructor;
1717

18-
enum StageType
18+
enum StageType : uint8_t
1919
{
2020
GEN,
2121
FW,

rviz_marker_tools/include/rviz_marker_tools/marker_creation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Geometry;
1111

1212
namespace rviz_marker_tools {
1313

14-
enum Color
14+
enum Color : uint8_t
1515
{
1616
BLACK = 0,
1717
BROWN = 1,

visualization/motion_planning_tasks/src/remote_task_model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ using namespace moveit::task_constructor;
5454

5555
namespace moveit_rviz_plugin {
5656

57-
enum NodeFlag
57+
enum NodeFlag : uint8_t
5858
{
5959
WAS_VISITED = 0x01, // indicate that model should emit change notifications
6060
NAME_CHANGED = 0x02, // indicate that name was manually changed

visualization/motion_planning_tasks/src/task_list_model.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class BaseTaskModel : public QAbstractItemModel
7777
rviz::DisplayContext* display_context_;
7878

7979
public:
80-
enum TaskModelFlag
80+
enum TaskModelFlag : uint8_t
8181
{
8282
LOCAL_MODEL = 0x01,
8383
IS_DESTROYED = 0x02,

visualization/motion_planning_tasks/src/task_panel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class TaskView : public SubPanel
118118

119119
protected:
120120
// configuration settings
121-
enum TaskExpand
121+
enum TaskExpand : uint8_t
122122
{
123123
EXPAND_TOP = 1,
124124
EXPAND_ALL,
@@ -130,7 +130,7 @@ class TaskView : public SubPanel
130130
rviz::BoolProperty* show_time_column;
131131

132132
public:
133-
enum OldTaskHandling
133+
enum OldTaskHandling : uint8_t
134134
{
135135
OLD_TASK_KEEP = 1,
136136
OLD_TASK_REPLACE,

0 commit comments

Comments
 (0)