diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-10-15 22:16:46 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-10-15 22:16:46 -0700 |
| commit | 93497f5eab0c1628cc5b1a3a9a671c069c8f8533 (patch) | |
| tree | 616bdaff4126c67923483b65886d443736001319 /toolsrc | |
| parent | d0902e01a5b4b275c322c883ae71484425c693b9 (diff) | |
| download | vcpkg-93497f5eab0c1628cc5b1a3a9a671c069c8f8533.tar.gz vcpkg-93497f5eab0c1628cc5b1a3a9a671c069c8f8533.zip | |
Casing and specification correctness
Diffstat (limited to 'toolsrc')
| -rw-r--r-- | toolsrc/src/vcpkg/commands.autocomplete.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 23c2c2f7e..3901566d9 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -93,16 +93,21 @@ namespace vcpkg::Commands::Autocomplete struct CommandEntry { + constexpr CommandEntry(const CStringView& regex, const CommandStructure& structure) + : regex(regex), structure(structure) + { + } + CStringView regex; const CommandStructure& structure; }; - static constexpr CommandEntry commands[] = { - {R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, - {R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, - {R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, + static constexpr CommandEntry COMMANDS[] = { + CommandEntry{R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, + CommandEntry{R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, + CommandEntry{R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, }; - for (auto&& command : commands) + for (auto&& command : COMMANDS) { if (std::regex_match(to_autocomplete, match, std::regex{command.regex.c_str()})) { |
