summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/plat/fapiPlatSystemConfig.C
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2013-03-20 13:18:15 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-03 11:00:44 -0500
commitcb09cefc89425d13fbc587c984c54ca1fc065a26 (patch)
tree5892756b813165a5075495d0c71af7a4e1bc3144 /src/usr/hwpf/plat/fapiPlatSystemConfig.C
parent4e113fa7bd9e069cf727566b8d8ea85c04588a0b (diff)
downloadtalos-hostboot-cb09cefc89425d13fbc587c984c54ca1fc065a26.tar.gz
talos-hostboot-cb09cefc89425d13fbc587c984c54ca1fc065a26.zip
loops: replace ++ and .size() with C++ iterators where possible.
Change-Id: I42a23fe81f08cb533b76ec5ff043bfe31b60bbdd RTC: 52905 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3697 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/plat/fapiPlatSystemConfig.C')
-rw-r--r--src/usr/hwpf/plat/fapiPlatSystemConfig.C18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/usr/hwpf/plat/fapiPlatSystemConfig.C b/src/usr/hwpf/plat/fapiPlatSystemConfig.C
index 6551ca6e1..a94766cbf 100644
--- a/src/usr/hwpf/plat/fapiPlatSystemConfig.C
+++ b/src/usr/hwpf/plat/fapiPlatSystemConfig.C
@@ -313,10 +313,13 @@ fapi::ReturnCode fapiGetChildChiplets(
false);
// Return fapi::Targets to the caller
- for (uint32_t i = 0; i < l_chipletList.size(); i++)
+ for (TARGETING::TargetHandleList::const_iterator
+ chipletIter = l_chipletList.begin();
+ chipletIter != l_chipletList.end();
+ ++chipletIter)
{
TARGETING::HwasState l_state =
- l_chipletList[i]->getAttr<TARGETING::ATTR_HWAS_STATE>();
+ (*chipletIter)->getAttr<TARGETING::ATTR_HWAS_STATE>();
if ((fapi::TARGET_STATE_PRESENT == i_state) &&
!l_state.present)
@@ -330,7 +333,7 @@ fapi::ReturnCode fapiGetChildChiplets(
}
fapi::Target l_chiplet(i_chipletType,
- reinterpret_cast<void *>(l_chipletList[i]));
+ reinterpret_cast<void *>(*chipletIter));
o_chiplets.push_back(l_chiplet);
}
}
@@ -388,10 +391,13 @@ fapi::ReturnCode fapiGetAssociatedDimms(
TARGETING::TargetService::ALL, &l_predicate);
// Return fapi::Targets to the caller
- for (uint32_t i = 0; i < l_dimmList.size(); i++)
+ for (TARGETING::TargetHandleList::const_iterator
+ dimmIter = l_dimmList.begin();
+ dimmIter != l_dimmList.end();
+ ++dimmIter)
{
TARGETING::HwasState l_state =
- l_dimmList[i]->getAttr<TARGETING::ATTR_HWAS_STATE>();
+ (*dimmIter)->getAttr<TARGETING::ATTR_HWAS_STATE>();
if ((fapi::TARGET_STATE_PRESENT == i_state) && !l_state.present)
{
@@ -404,7 +410,7 @@ fapi::ReturnCode fapiGetAssociatedDimms(
}
fapi::Target l_dimm(fapi::TARGET_TYPE_DIMM,
- reinterpret_cast<void *>(l_dimmList[i]));
+ reinterpret_cast<void *>(*dimmIter));
o_dimms.push_back(l_dimm);
}
}
OpenPOWER on IntegriCloud