return;
builder.get_logger().log("files", format("Traversing %s", platforms_dir.str()));
- vector<string> platforms = list_filtered(platforms_dir, "^android-[1-9][0-9]*$");
-
- for(vector<string>::const_iterator i=platforms.begin(); i!=platforms.end(); ++i)
- supported_api_levels.insert(lexical_cast<unsigned>(i->substr(8)));
+ for(const string &p: list_filtered(platforms_dir, "^android-[1-9][0-9]*$"))
+ supported_api_levels.insert(lexical_cast<unsigned>(p.substr(8)));
}
void AndroidDevKit::select_api_level(unsigned api)
}
builder.get_logger().log("files", format("Traversing %s", bt_dir.str()));
- vector<string> tool_versions = list_files(bt_dir);
-
string use_tools;
unsigned latest_version = 0;
- for(vector<string>::const_iterator i=tool_versions.begin(); i!=tool_versions.end(); ++i)
+ for(const string &v: list_files(bt_dir))
{
- unsigned version = parse_version(*i);
+ unsigned version = parse_version(v);
if(version>latest_version)
{
- use_tools = *i;
+ use_tools = v;
latest_version = version;
}
}
builder.get_logger().log("files", format("Traversing %s", toolchains_dir.str()));
string prefix = architecture.get_cross_prefix()+"-";
- vector<string> toolchains = list_filtered(toolchains_dir, "^"+prefix);
-
string use_toolchain;
unsigned latest_version = 0;
- for(vector<string>::const_iterator i=toolchains.begin(); i!=toolchains.end(); ++i)
+ for(const string &t: list_filtered(toolchains_dir, "^"+prefix))
{
- string version_str = i->substr(prefix.size());
+ string version_str = t.substr(prefix.size());
string compiler = "gcc";
if(!isdigit(version_str[0]))
{
unsigned version = parse_version(version_str);
if(version>latest_version)
{
- use_toolchain = *i;
+ use_toolchain = t;
latest_version = version;
}
}
FS::Path platform_archs_dir = root/"platforms"/format("android-%d", api);
builder.get_logger().log("files", format("Traversing %s", platform_archs_dir.str()));
vector<string> platform_archs = list_filtered(platform_archs_dir, "^arch-");
- for(vector<string>::iterator i=platform_archs.begin(); i!=platform_archs.end(); ++i)
- i->erase(0, 5);
+ for(string &a: platform_archs)
+ a.erase(0, 5);
string use_arch = architecture.best_match(platform_archs);
if(use_arch.empty())
const set<unsigned> &sdk_api_levels = sdk.get_supported_api_levels();
const set<unsigned> &ndk_api_levels = ndk.get_supported_api_levels();
unsigned highest_common = 0;
- for(set<unsigned>::const_reverse_iterator i=sdk_api_levels.rbegin(); (!highest_common && i!=sdk_api_levels.rend()); ++i)
+ for(auto i=sdk_api_levels.rbegin(); (!highest_common && i!=sdk_api_levels.rend()); ++i)
if(ndk_api_levels.count(*i))
highest_common = *i;