X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Ftools%2Fgn%2Fcommand_help.cc;h=d20757271a48e81948b6c731a11637a554d61799;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=ef5f70bcca0b02e8e14a461a5f3ce44199f309e4;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/tools/gn/command_help.cc b/src/tools/gn/command_help.cc index ef5f70b..d207572 100644 --- a/src/tools/gn/command_help.cc +++ b/src/tools/gn/command_help.cc @@ -22,11 +22,8 @@ namespace { void PrintToplevelHelp() { OutputString("Commands (type \"gn help \" for more details):\n"); - - const commands::CommandInfoMap& command_map = commands::GetCommands(); - for (commands::CommandInfoMap::const_iterator i = command_map.begin(); - i != command_map.end(); ++i) - PrintShortHelp(i->second.help_short); + for (const auto& cmd : commands::GetCommands()) + PrintShortHelp(cmd.second.help_short); OutputString( "\n" @@ -56,39 +53,30 @@ void PrintToplevelHelp() { // Target declarations. OutputString("\nTarget declarations (type \"gn help \" for more " "details):\n"); - const functions::FunctionInfoMap& function_map = functions::GetFunctions(); - for (functions::FunctionInfoMap::const_iterator i = function_map.begin(); - i != function_map.end(); ++i) { - if (i->second.is_target) - PrintShortHelp(i->second.help_short); + for (const auto& func : functions::GetFunctions()) { + if (func.second.is_target) + PrintShortHelp(func.second.help_short); } // Functions. OutputString("\nBuildfile functions (type \"gn help \" for more " "details):\n"); - for (functions::FunctionInfoMap::const_iterator i = function_map.begin(); - i != function_map.end(); ++i) { - if (!i->second.is_target) - PrintShortHelp(i->second.help_short); + for (const auto& func : functions::GetFunctions()) { + if (!func.second.is_target) + PrintShortHelp(func.second.help_short); } // Built-in variables. OutputString("\nBuilt-in predefined variables (type \"gn help \" " "for more details):\n"); - const variables::VariableInfoMap& builtin_vars = - variables::GetBuiltinVariables(); - for (variables::VariableInfoMap::const_iterator i = builtin_vars.begin(); - i != builtin_vars.end(); ++i) - PrintShortHelp(i->second.help_short); + for (const auto& builtin : variables::GetBuiltinVariables()) + PrintShortHelp(builtin.second.help_short); // Target variables. OutputString("\nVariables you set in targets (type \"gn help \" " "for more details):\n"); - const variables::VariableInfoMap& target_vars = - variables::GetTargetVariables(); - for (variables::VariableInfoMap::const_iterator i = target_vars.begin(); - i != target_vars.end(); ++i) - PrintShortHelp(i->second.help_short); + for (const auto& target : variables::GetTargetVariables()) + PrintShortHelp(target.second.help_short); OutputString("\nOther help topics:\n"); PrintShortHelp("buildargs: How build arguments work.");