template<typename T>
inline const Architecture::PatternList &Architecture::get_patterns() const
{
- std::map<std::string, PatternList>::const_iterator i = filename_patterns.find(typeid(T).name());
+ auto i = filename_patterns.find(typeid(T).name());
if(i!=filename_patterns.end())
return i->second;
if(processing_unit!=Tool::ONE_FILE)
{
FS::Path source_dir = FS::dirname(*i);
- SourceList::iterator j = i;
+ auto j = i;
for(++j; j!=source_filenames.end(); )
{
if((processing_unit!=Tool::DIRECTORY || FS::dirname(*j)==source_dir) &&
{
BuildType btype(n);
load_sub(btype);
- BuildTypeMap::iterator i = obj.build_types.insert(BuildTypeMap::value_type(n, btype)).first;
+ auto i = obj.build_types.insert(BuildTypeMap::value_type(n, btype)).first;
if(!obj.build_type)
obj.build_type = &i->second;
}
Target *BuildGraph::get_target(const string &n) const
{
- TargetMap::const_iterator i = targets.find(n);
+ auto i = targets.find(n);
if(i!=targets.end())
return i->second;
return 0;
BuildInfo::LibraryMode BuildInfo::get_libmode_for(const string &lib) const
{
- LibModeMap::const_iterator i = libmodes.find(lib);
+ auto i = libmodes.find(lib);
if(i!=libmodes.end())
return i->second;
return libmode;
for(const auto &kvp: bi.standards)
{
- StandardMap::iterator j = standards.find(kvp.first);
+ auto j = standards.find(kvp.first);
if(j==standards.end())
standards.insert(kvp);
else if(kvp.second.type!=j->second.type || kvp.second.year!=j->second.year)
void Cache::append_value(const Target *tgt, const string &k, const string &v)
{
Key key(tgt->get_name(), k);
- DataMap::iterator i = data.find(key);
+ auto i = data.find(key);
if(i==data.end())
i = data.insert(DataMap::value_type(key, ValueList())).first;
i->second.push_back(v);
const Config::Option &Config::add_option(const Feature &f)
{
Option opt(f);
- InputOptions::const_iterator i = pending_options.find(opt.name);
+ auto i = pending_options.find(opt.name);
if(i!=pending_options.end())
opt.value = i->second;
{
bool result = false;
- OptionMap::iterator i = options.find(opt);
+ auto i = options.find(opt);
if(i!=options.end())
{
if(i->second.value!=val)
{
if(compiler_tag=="CXX")
{
- BuildInfo::LibModeMap::const_iterator i = binfo.libmodes.find("stdc++");
+ auto i = binfo.libmodes.find("stdc++");
if(i!=binfo.libmodes.end() && i->second<=BuildInfo::STATIC)
argv.push_back("-static-libstdc++");
}
void PackageManager::add_package(Package *pkg)
{
- PackageMap::iterator i = packages.find(pkg->get_name());
+ auto i = packages.find(pkg->get_name());
if(i!=packages.end())
{
if(i->second!=pkg)
Package *PackageManager::get_package(const string &name) const
{
- PackageMap::const_iterator i = packages.find(name);
+ auto i = packages.find(name);
if(i!=packages.end())
return i->second;
if(!path.empty())
{
builder.load_build_file(path/"Build");
- PackageMap::iterator i = packages.find(name);
+ auto i = packages.find(name);
if(i!=packages.end())
return i->second;
}
{
/* Make sure the source tarball is last in the list so targets from all
other components wil be created first */
- ComponentList::iterator i = find(obj.components, obj.source_archive);
+ auto i = find(obj.components, obj.source_archive);
if(i!=obj.components.end())
obj.components.splice(obj.components.end(), obj.components, i);
}
const Config::Option &opt = obj.config.add_option(feat);
if(options)
{
- Config::InputOptions::const_iterator i = options->find(opt.name);
+ auto i = options->find(opt.name);
if(i!=options->end())
obj.config.set_option(opt.name, i->second);
}
FileTarget *VirtualFileSystem::get_target(const FS::Path &p) const
{
- TargetMap::const_iterator i = targets.find(p.str());
+ auto i = targets.find(p.str());
if(i!=targets.end())
return static_cast<FileTarget *>(i->second);
return 0;