aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/vcpkgcmdarguments.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h
index 93eeb6ef5..d84be9c22 100644
--- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h
+++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h
@@ -3,6 +3,7 @@
#include <vcpkg/base/cstringview.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/span.h>
+#include <vcpkg/base/stringliteral.h>
#include <memory>
#include <unordered_map>
@@ -21,14 +22,24 @@ namespace vcpkg
struct CommandSwitch
{
- std::string name;
- CStringView short_help_text;
+ constexpr CommandSwitch(const StringLiteral& name, const StringLiteral& short_help_text)
+ : name(name), short_help_text(short_help_text)
+ {
+ }
+
+ StringLiteral name;
+ StringLiteral short_help_text;
};
struct CommandSetting
{
- std::string name;
- CStringView short_help_text;
+ constexpr CommandSetting(const StringLiteral& name, const StringLiteral& short_help_text)
+ : name(name), short_help_text(short_help_text)
+ {
+ }
+
+ StringLiteral name;
+ StringLiteral short_help_text;
};
struct CommandOptionsStructure