From 19bea9ae44ea9af30e1e4443c69a22b04e2cd56d Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Sat, 20 Oct 2018 19:54:27 -0700 Subject: cleanup: rename fru_area_vec_t type and use using Rename fru_area_vec_t to FruAreaVector and declare with using instead of typedef. Change-Id: I482c8ce7cedef1c67efb49b2e066ba9867547e93 Signed-off-by: Patrick Venture --- fru_area.hpp | 3 --- writefrudata.cpp | 10 ++++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/fru_area.hpp b/fru_area.hpp index 2595e54..6cebb3c 100644 --- a/fru_area.hpp +++ b/fru_area.hpp @@ -12,9 +12,6 @@ #include #include -class IPMIFruArea; -typedef std::vector> fru_area_vec_t; - class IPMIFruArea { private: diff --git a/writefrudata.cpp b/writefrudata.cpp index 0294e57..1cbf210 100644 --- a/writefrudata.cpp +++ b/writefrudata.cpp @@ -27,6 +27,8 @@ using namespace phosphor::logging; extern const FruMap frus; extern const std::map extras; +using FruAreaVector = std::vector>; + namespace { @@ -34,7 +36,7 @@ namespace // Cleanup routine // Must always be called as last reference to fru_fp. //------------------------------------------------------------ -int cleanupError(FILE* fru_fp, fru_area_vec_t& fru_area_vec) +int cleanupError(FILE* fru_fp, FruAreaVector& fru_area_vec) { if (fru_fp != NULL) { @@ -142,7 +144,7 @@ auto getService(sdbusplus::bus::bus& bus, const std::string& intf, // Takes FRU data, invokes Parser for each fru record area and updates // Inventory //------------------------------------------------------------------------ -int updateInventory(fru_area_vec_t& area_vec, sd_bus* bus_sd) +int updateInventory(FruAreaVector& area_vec, sd_bus* bus_sd) { // Generic error reporter int rc = 0; @@ -466,7 +468,7 @@ bool remove_invalid_area(const std::unique_ptr& fru_area) // @prereq : This must be called only after validating common header. ///---------------------------------------------------------------------------------- int ipmi_populate_fru_areas(uint8_t* fru_data, const size_t data_len, - fru_area_vec_t& fru_area_vec) + FruAreaVector& fru_area_vec) { int rc = -1; @@ -594,7 +596,7 @@ int validateFRUArea(const uint8_t fruid, const char* fru_file_name, // Vector that holds individual IPMI FRU AREAs. Although MULTI and INTERNAL // are not used, keeping it here for completeness. - fru_area_vec_t fru_area_vec; + FruAreaVector fru_area_vec; for (uint8_t fru_entry = IPMI_FRU_INTERNAL_OFFSET; fru_entry < (sizeof(struct common_header) - 2); fru_entry++) -- cgit v1.2.1