Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc40e7d7 authored by Enrico Granata's avatar Enrico Granata Committed by Android (Google) Code Review
Browse files

Merge "Make toInt() a little bit shorter by moving std::underlying_type to a...

Merge "Make toInt() a little bit shorter by moving std::underlying_type to a template argument" into pi-dev
parents a8617fa6 ad7b9279
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -33,10 +33,9 @@ namespace V2_0 {
constexpr int32_t kAllSupportedAreas = 0;

/** Returns underlying (integer) value for given enum. */
template<typename ENUM>
inline constexpr typename std::underlying_type<ENUM>::type toInt(
        ENUM const value) {
    return static_cast<typename std::underlying_type<ENUM>::type>(value);
template<typename ENUM, typename U = typename std::underlying_type<ENUM>::type>
inline constexpr U toInt(ENUM const value) {
    return static_cast<U>(value);
}

inline constexpr VehiclePropertyType getPropType(int32_t prop) {