diff options
author | Evan Martin <martine@danga.com> | 2012-01-04 23:47:29 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-01-04 23:56:29 (GMT) |
commit | d56c101948bd69fdc9e7541eb6ac38ebc0e6c8bf (patch) | |
tree | e7193e2fa4aaa2c15752215f6a4fef12c6044d50 /src/ninja.cc | |
parent | 4f6f015b7f43099a2514c8e75308d81dcd1b8e7d (diff) | |
download | Ninja-d56c101948bd69fdc9e7541eb6ac38ebc0e6c8bf.zip Ninja-d56c101948bd69fdc9e7541eb6ac38ebc0e6c8bf.tar.gz Ninja-d56c101948bd69fdc9e7541eb6ac38ebc0e6c8bf.tar.bz2 |
allow spellcheck to be used with a vector of strings
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index a747c48..64ab454 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -494,9 +494,10 @@ int RunTool(const string& tool, Globals* globals, int argc, char** argv) { return tools[i].func(globals, argc, argv); } - const char* suggestion = SpellcheckString(tool, - "graph", "query", "browse", "targets", "rules", "commands", "clean", - "list", NULL); + vector<const char*> words; + for (int i = 0; tools[i].name; ++i) + words.push_back(tools[i].name); + const char* suggestion = SpellcheckStringV(tool, words); if (suggestion) { Error("unknown tool '%s', did you mean '%s'?", tool.c_str(), suggestion); } else { |