diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-29 10:34:05 -0400 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-29 10:34:46 -0400 |
commit | d1eac88d18ae7dd11033dba87b6aebb220da9064 (patch) | |
tree | 9744e38138ff853c53868d847f86e9ad58e9ac66 /src/data_types.hpp | |
parent | 1abcb06bedadfbd40b4ec6f7e5f6a95021df3c96 (diff) | |
download | phosphor-dbus-monitor-d1eac88d18ae7dd11033dba87b6aebb220da9064.tar.gz phosphor-dbus-monitor-d1eac88d18ae7dd11033dba87b6aebb220da9064.zip |
Enable clang-format
Fix up errors and enable clang-format during CI builds.
Change-Id: I4176b81f8b85a287af9354165e09ff66aeb9fb29
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'src/data_types.hpp')
-rw-r--r-- | src/data_types.hpp | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/src/data_types.hpp b/src/data_types.hpp index 607289a..6be6431 100644 --- a/src/data_types.hpp +++ b/src/data_types.hpp @@ -17,17 +17,17 @@ constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper"; constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper"; constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper"; -//PropertyIndex::key_type fields +// PropertyIndex::key_type fields constexpr auto pathIndex = 0; constexpr auto interfaceIndex = 1; constexpr auto propertyIndex = 2; -//PropertyIndex::mapped_type fields +// PropertyIndex::mapped_type fields constexpr auto pathMetaIndex = 0; constexpr auto propertyMetaIndex = 1; constexpr auto storageIndex = 2; -//ConfigPropertyStorage fields +// ConfigPropertyStorage fields constexpr auto valueIndex = 0; constexpr auto resultIndex = 1; @@ -42,12 +42,11 @@ template <typename Key, typename Value> using RefKeyMap = std::map<std::reference_wrapper<Key>, Value, std::less<Key>>; /** @brief A map with a tuple of references as keys. */ -template <typename Value, typename ...Keys> +template <typename Value, typename... Keys> using TupleRefMap = std::map<TupleOfRefs<Keys...>, Value, TupleOfRefsLess>; /** @brief A vector of references. */ -template <typename T> -using RefVector = std::vector<std::reference_wrapper<T>>; +template <typename T> using RefVector = std::vector<std::reference_wrapper<T>>; /** @brief * @@ -59,31 +58,23 @@ using MapperPath = std::string; /** @brief ObjectManager.InterfacesAdded signal signature alias. */ template <typename T> -using InterfacesAdded = std::map < - std::string, - std::map < - std::string, - sdbusplus::message::variant<T >>>; +using InterfacesAdded = + std::map<std::string, + std::map<std::string, sdbusplus::message::variant<T>>>; /** @brief ObjectMapper.GetObject response signature alias. */ using GetObject = std::map<MapperPath, std::vector<std::string>>; /** @brief Properties.GetAll response signature alias. */ template <typename T> -using PropertiesChanged = std::map < - std::string, - sdbusplus::message::variant<T >>; +using PropertiesChanged = std::map<std::string, sdbusplus::message::variant<T>>; /** @brief Lookup index for properties . */ // *INDENT-OFF* -using PropertyIndex = TupleRefMap < - TupleOfRefs< - const std::string, - const std::string, - std::tuple<any_ns::any, any_ns::any>>, - const std::string, - const std::string, - const std::string >; +using PropertyIndex = + TupleRefMap<TupleOfRefs<const std::string, const std::string, + std::tuple<any_ns::any, any_ns::any>>, + const std::string, const std::string, const std::string>; // *INDENT-ON* /** @brief Convert some C++ types to others. @@ -97,8 +88,7 @@ template <typename T> struct Downcast { using Type = std::remove_cv_t<std::remove_reference_t<T>>; }; -template <typename T> using DowncastType = - typename Downcast<T>::Type; +template <typename T> using DowncastType = typename Downcast<T>::Type; } // namespace monitoring } // namespace dbus |