diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-09 02:07:33 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-10 23:14:26 +0100 |
commit | 8358707d8276dd297655395b922560e3c65631e1 (patch) | |
tree | a83f2fda1657b9c67ced9c2cf4c337143097e913 /utils/regtools/qeditor/backend.cpp | |
parent | 1f4f7369eebfea85b9cb74a7ecae04b05bf44d07 (diff) |
hwstub/regtools/qeditor: put soc descriptors in a list instead of a vector
A SoC descriptor is not a small object: it can be as large as ~100KiB so
it's better to avoid copying things over.
Change-Id: I1ef862e1260299cdaa0c4d2822ac45968713498a
Diffstat (limited to 'utils/regtools/qeditor/backend.cpp')
-rw-r--r-- | utils/regtools/qeditor/backend.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/regtools/qeditor/backend.cpp b/utils/regtools/qeditor/backend.cpp index d2b75be701..22210916b1 100644 --- a/utils/regtools/qeditor/backend.cpp +++ b/utils/regtools/qeditor/backend.cpp @@ -14,17 +14,17 @@ Backend::Backend() QStringList Backend::GetSocNameList() { QStringList sl; - for(size_t i = 0; i < m_socs.size(); i++) - sl.append(QString(m_socs[i].name.c_str())); + foreach(const soc_t& soc, m_socs) + sl.append(QString(soc.name.c_str())); return sl; } bool Backend::GetSocByName(const QString& name, soc_t& s) { - for(size_t i = 0; i < m_socs.size(); i++) - if(m_socs[i].name == name.toStdString()) + for(std::list< soc_t >::iterator it = m_socs.begin(); it != m_socs.end(); ++it) + if(it->name == name.toStdString()) { - s = m_socs[i]; + s = *it; return true; } return false; |