Skip to content

Commit

Permalink
[Modernize] Use 'using' instead of 'typedef'. NFC.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-de-Grandmaison-ARM committed Apr 24, 2024
1 parent 8f8ebad commit 3fc70f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/PAF/SCA/Expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class ValueType {
class Value {
public:
/// The concrete type used by values.
typedef uint64_t ConcreteType;
using ConcreteType = uint64_t;

/// Construct a default Value.
Value() : val(ConcreteType()) {}
Expand Down
2 changes: 1 addition & 1 deletion include/PAF/SCA/NPArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class NPArrayBase {
template <class Ty> class NPArray : public NPArrayBase {
public:
/// The array elements' type.
typedef Ty DataTy;
using DataTy = Ty;

static_assert(std::is_arithmetic<Ty>(),
"expecting an integral or floating point type");
Expand Down
9 changes: 4 additions & 5 deletions include/PAF/SCA/NPOperators.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ template <typename DataTy, template <typename, bool> class operation,
struct NPOperatorTraits {
/// \p valueType is the type of the result of \p value(), with the const /
/// ref removed.
typedef typename std::remove_reference<typename std::remove_const<
decltype(operation<DataTy, enableLocation>().value())>::type>::type
valueType;
using valueType = typename std::remove_reference<typename std::remove_const<
decltype(operation<DataTy, enableLocation>().value())>::type>::type;

/// \p applicationReturnType is the return type of the application of \p
/// operation.
typedef typename std::remove_reference<
using applicationReturnType = typename std::remove_reference<
typename std::remove_const<decltype(operation<DataTy, enableLocation>()(
DataTy(), 0, 0))>::type>::type applicationReturnType;
DataTy(), 0, 0))>::type>::type;
};

/// NPPredicates implement the function call operator and must be copyable.
Expand Down
2 changes: 1 addition & 1 deletion include/PAF/WAN/Signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class Signal {
// The PackTy class packs several values together in the same (memory)
// storage location. This optimization is done in order to use less memory.
class Pack {
typedef uint32_t Ty;
using Ty = uint32_t;

static const constexpr Ty MASK = (1 << Logic::encoding()) - 1;
static constexpr size_t shiftAmount(size_t offset) {
Expand Down

0 comments on commit 3fc70f9

Please sign in to comment.