Skip to content

Commit 0aff5d5

Browse files
committed
replace remaining typedefs by using declaration
I have no idea why these were not picked up by clang-tidy.
1 parent 21f3d95 commit 0aff5d5

File tree

18 files changed

+18
-19
lines changed

18 files changed

+18
-19
lines changed

core/include/moveit/task_constructor/cost_queue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ template <typename T, typename Compare = ValueOrPointeeLess<T>>
2929
class ordered
3030
{
3131
public:
32-
typedef std::list<T> container_type;
32+
using container_type = std::list<T>;
3333
using value_type = typename container_type::value_type;
3434
using size_type = typename container_type::size_type;
3535
using difference_type = typename container_type::difference_type;

core/include/moveit/task_constructor/properties.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class Property
7575
const boost::any& default_value);
7676

7777
public:
78-
typedef boost::typeindex::type_info type_info;
78+
using type_info = boost::typeindex::type_info;
7979

8080
/// Construct a property holding a any value
8181
Property();

core/include/moveit/task_constructor/stage_p.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class StagePrivate
6464

6565
public:
6666
/// container type used to store children
67-
typedef std::list<Stage::pointer> container_type;
67+
using container_type = std::list<Stage::pointer>;
6868
StagePrivate(Stage* me, const std::string& name);
6969
virtual ~StagePrivate() = default;
7070

core/include/moveit/task_constructor/storage.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ namespace task_constructor {
6565
class SolutionBase;
6666
MOVEIT_CLASS_FORWARD(InterfaceState)
6767
MOVEIT_CLASS_FORWARD(Interface)
68-
typedef std::weak_ptr<Interface> InterfaceWeakPtr;
6968
MOVEIT_CLASS_FORWARD(Stage)
7069
MOVEIT_CLASS_FORWARD(Introspection)
7170

core/include/moveit/task_constructor/task.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Task : protected WrapperBase
100100
void enableIntrospection(bool enable = true);
101101
Introspection& introspection();
102102

103-
typedef std::function<void(const Task& t)> TaskCallback;
103+
using TaskCallback = std::function<void(const Task& t)>;
104104
using TaskCallbackList = std::list<TaskCallback>;
105105
/// add function to be called after each top-level iteration
106106
TaskCallbackList::const_iterator addTaskCallback(TaskCallback&& cb);

core/include/moveit/task_constructor/utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ class Flags
117117
Int i;
118118
};
119119

120-
#define DECLARE_FLAGS(Flags, Enum) typedef QFlags<Enum> Flags;
120+
#define DECLARE_FLAGS(Flags, Enum) using Flags = QFlags<Enum>;

core/src/container.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ struct SolutionCollector
304304
solutions.emplace_back(std::make_pair(trace, cost));
305305
}
306306

307-
typedef std::list<std::pair<SolutionSequence::container_type, double>> SolutionCostPairs;
307+
using SolutionCostPairs = std::list<std::pair<SolutionSequence::container_type, double>>;
308308
SolutionCostPairs solutions;
309309
const size_t max_depth;
310310
};

core/src/properties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class PropertyTypeRegistry
5757
Entry dummy_;
5858

5959
// map from type_info to corresponding converter functions
60-
typedef std::map<std::type_index, Entry> RegistryMap;
60+
using RegistryMap = std::map<std::type_index, Entry>;
6161
RegistryMap types_;
6262
// map from type names (type.name or ROS msg name) to entry in types_
6363
using TypeNameMap = std::map<std::string, RegistryMap::iterator>;

core/src/stages/compute_ik.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ void ComputeIK::setTargetPose(const Eigen::Isometry3d& pose, const std::string&
8282
setTargetPose(pose_msg);
8383
}
8484

85-
// found IK solutions with a flag indicating validity
86-
typedef std::vector<std::vector<double>> IKSolutions;
85+
// found IK solutions
86+
using IKSolutions = std::vector<std::vector<double>>;
8787

8888
namespace {
8989

core/src/stages/fixed_cartesian_poses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace moveit {
4444
namespace task_constructor {
4545
namespace stages {
4646

47-
typedef std::vector<geometry_msgs::PoseStamped> PosesList;
47+
using PosesList = std::vector<geometry_msgs::PoseStamped>;
4848

4949
FixedCartesianPoses::FixedCartesianPoses(const std::string& name) : MonitoringGenerator(name) {
5050
auto& p = properties();

0 commit comments

Comments
 (0)