summaryrefslogtreecommitdiffstats
path: root/utils/hwstub/tools
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-09 02:07:33 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-10 23:14:26 +0100
commit8358707d8276dd297655395b922560e3c65631e1 (patch)
treea83f2fda1657b9c67ced9c2cf4c337143097e913 /utils/hwstub/tools
parent1f4f7369eebfea85b9cb74a7ecae04b05bf44d07 (diff)
downloadrockbox-8358707d8276dd297655395b922560e3c65631e1.tar.gz
rockbox-8358707d8276dd297655395b922560e3c65631e1.zip
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/hwstub/tools')
-rw-r--r--utils/hwstub/tools/hwstub_shell.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/hwstub/tools/hwstub_shell.cpp b/utils/hwstub/tools/hwstub_shell.cpp
index 61cb617509..3cc6f8c259 100644
--- a/utils/hwstub/tools/hwstub_shell.cpp
+++ b/utils/hwstub/tools/hwstub_shell.cpp
@@ -647,13 +647,13 @@ bool my_lua_import_soc(const soc_t& soc)
return true;
}
-bool my_lua_import_soc(const std::vector< soc_t >& socs)
+bool my_lua_import_soc(const std::list< soc_t >& socs)
{
- for(size_t i = 0; i < socs.size(); i++)
+ for(std::list< soc_t >::const_iterator it = socs.begin(); it != socs.end(); ++it)
{
if(!g_quiet)
- printf("importing %s...\n", socs[i].name.c_str());
- if(!my_lua_import_soc(socs[i]))
+ printf("importing %s...\n", it->name.c_str());
+ if(!my_lua_import_soc(*it))
return false;
}
return true;
@@ -711,7 +711,7 @@ int main(int argc, char **argv)
}
// load register descriptions
- std::vector< soc_t > socs;
+ std::list< soc_t > socs;
for(int i = optind; i < argc; i++)
if(!soc_desc_parse_xml(argv[i], socs))
{