Skip to content

Commit ad17a85

Browse files
committed
Object numbering: Switch typedef to using
1 parent da6fa5d commit ad17a85

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

src/util/numbering.h

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,18 @@ template <typename T>
2323
class numbering final
2424
{
2525
public:
26-
// NOLINTNEXTLINE(readability/identifiers)
27-
typedef std::size_t number_type;
26+
using number_type = std::size_t; // NOLINT
2827

2928
private:
30-
typedef std::vector<T> data_typet;
29+
using data_typet = std::vector<T>; // NOLINT
3130
data_typet data;
32-
typedef std::map<T, number_type> numberst;
31+
using numberst = std::map<T, number_type>; // NOLINT
3332
numberst numbers;
3433

3534
public:
36-
// NOLINTNEXTLINE(readability/identifiers)
37-
typedef typename data_typet::size_type size_type;
38-
// NOLINTNEXTLINE(readability/identifiers)
39-
typedef typename data_typet::iterator iterator;
40-
// NOLINTNEXTLINE(readability/identifiers)
41-
typedef typename data_typet::const_iterator const_iterator;
35+
using size_type = typename data_typet::size_type; // NOLINT
36+
using iterator = typename data_typet::iterator; // NOLINT
37+
using const_iterator = typename data_typet::const_iterator; // NOLINT
4238

4339
number_type number(const T &a)
4440
{
@@ -96,22 +92,18 @@ template <typename T, class hash_fkt>
9692
class hash_numbering final
9793
{
9894
public:
99-
// NOLINTNEXTLINE(readability/identifiers)
100-
typedef unsigned int number_type;
95+
using number_type = unsigned int; // NOLINT
10196

10297
private:
103-
typedef std::vector<T> data_typet;
98+
using data_typet = std::vector<T>; // NOLINT
10499
data_typet data;
105-
typedef std::unordered_map<T, number_type, hash_fkt> numberst;
100+
using numberst = std::unordered_map<T, number_type, hash_fkt>; // NOLINT
106101
numberst numbers;
107102

108103
public:
109-
// NOLINTNEXTLINE(readability/identifiers)
110-
typedef typename data_typet::size_type size_type;
111-
// NOLINTNEXTLINE(readability/identifiers)
112-
typedef typename data_typet::iterator iterator;
113-
// NOLINTNEXTLINE(readability/identifiers)
114-
typedef typename data_typet::const_iterator const_iterator;
104+
using size_type = typename data_typet::size_type; // NOLINT
105+
using iterator = typename data_typet::iterator; // NOLINT
106+
using const_iterator = typename data_typet::const_iterator; // NOLINT
115107

116108
number_type number(const T &a)
117109
{

0 commit comments

Comments
 (0)