@@ -24,8 +24,8 @@ EnvironmentOptions* PerIsolateOptions::get_per_env_options() {
24
24
namespace options_parser {
25
25
26
26
template <typename Options>
27
- void OptionsParser<Options>::AddOption(const std::string& name,
28
- const std::string& help_text,
27
+ void OptionsParser<Options>::AddOption(const char * name,
28
+ const char * help_text,
29
29
bool Options::* field,
30
30
OptionEnvvarSettings env_setting) {
31
31
options_.emplace (name,
@@ -36,8 +36,8 @@ void OptionsParser<Options>::AddOption(const std::string& name,
36
36
}
37
37
38
38
template <typename Options>
39
- void OptionsParser<Options>::AddOption(const std::string& name,
40
- const std::string& help_text,
39
+ void OptionsParser<Options>::AddOption(const char * name,
40
+ const char * help_text,
41
41
uint64_t Options::* field,
42
42
OptionEnvvarSettings env_setting) {
43
43
options_.emplace (
@@ -49,8 +49,8 @@ void OptionsParser<Options>::AddOption(const std::string& name,
49
49
}
50
50
51
51
template <typename Options>
52
- void OptionsParser<Options>::AddOption(const std::string& name,
53
- const std::string& help_text,
52
+ void OptionsParser<Options>::AddOption(const char * name,
53
+ const char * help_text,
54
54
int64_t Options::* field,
55
55
OptionEnvvarSettings env_setting) {
56
56
options_.emplace (
@@ -62,8 +62,8 @@ void OptionsParser<Options>::AddOption(const std::string& name,
62
62
}
63
63
64
64
template <typename Options>
65
- void OptionsParser<Options>::AddOption(const std::string& name,
66
- const std::string& help_text,
65
+ void OptionsParser<Options>::AddOption(const char * name,
66
+ const char * help_text,
67
67
std::string Options::* field,
68
68
OptionEnvvarSettings env_setting) {
69
69
options_.emplace (
@@ -76,8 +76,8 @@ void OptionsParser<Options>::AddOption(const std::string& name,
76
76
77
77
template <typename Options>
78
78
void OptionsParser<Options>::AddOption(
79
- const std::string& name,
80
- const std::string& help_text,
79
+ const char * name,
80
+ const char * help_text,
81
81
std::vector<std::string> Options::* field,
82
82
OptionEnvvarSettings env_setting) {
83
83
options_.emplace (name, OptionInfo {
@@ -89,8 +89,8 @@ void OptionsParser<Options>::AddOption(
89
89
}
90
90
91
91
template <typename Options>
92
- void OptionsParser<Options>::AddOption(const std::string& name,
93
- const std::string& help_text,
92
+ void OptionsParser<Options>::AddOption(const char * name,
93
+ const char * help_text,
94
94
HostPort Options::* field,
95
95
OptionEnvvarSettings env_setting) {
96
96
options_.emplace (
@@ -102,44 +102,44 @@ void OptionsParser<Options>::AddOption(const std::string& name,
102
102
}
103
103
104
104
template <typename Options>
105
- void OptionsParser<Options>::AddOption(const std::string& name,
106
- const std::string& help_text,
105
+ void OptionsParser<Options>::AddOption(const char * name,
106
+ const char * help_text,
107
107
NoOp no_op_tag,
108
108
OptionEnvvarSettings env_setting) {
109
109
options_.emplace (name, OptionInfo{kNoOp , nullptr , env_setting, help_text});
110
110
}
111
111
112
112
template <typename Options>
113
- void OptionsParser<Options>::AddOption(const std::string& name,
114
- const std::string& help_text,
113
+ void OptionsParser<Options>::AddOption(const char * name,
114
+ const char * help_text,
115
115
V8Option v8_option_tag,
116
116
OptionEnvvarSettings env_setting) {
117
117
options_.emplace (name,
118
118
OptionInfo{kV8Option , nullptr , env_setting, help_text});
119
119
}
120
120
121
121
template <typename Options>
122
- void OptionsParser<Options>::AddAlias(const std::string& from,
123
- const std::string& to) {
122
+ void OptionsParser<Options>::AddAlias(const char * from,
123
+ const char * to) {
124
124
aliases_[from] = { to };
125
125
}
126
126
127
127
template <typename Options>
128
- void OptionsParser<Options>::AddAlias(const std::string& from,
128
+ void OptionsParser<Options>::AddAlias(const char * from,
129
129
const std::vector<std::string>& to) {
130
130
aliases_[from] = to;
131
131
}
132
132
133
133
template <typename Options>
134
134
void OptionsParser<Options>::AddAlias(
135
- const std::string& from,
135
+ const char * from,
136
136
const std::initializer_list<std::string>& to) {
137
137
AddAlias (from, std::vector<std::string>(to));
138
138
}
139
139
140
140
template <typename Options>
141
- void OptionsParser<Options>::Implies(const std::string& from,
142
- const std::string& to) {
141
+ void OptionsParser<Options>::Implies(const char * from,
142
+ const char * to) {
143
143
auto it = options_.find (to);
144
144
CHECK_NE (it, options_.end ());
145
145
CHECK_EQ (it->second .type , kBoolean );
@@ -149,8 +149,8 @@ void OptionsParser<Options>::Implies(const std::string& from,
149
149
}
150
150
151
151
template <typename Options>
152
- void OptionsParser<Options>::ImpliesNot(const std::string& from,
153
- const std::string& to) {
152
+ void OptionsParser<Options>::ImpliesNot(const char * from,
153
+ const char * to) {
154
154
auto it = options_.find (to);
155
155
CHECK_NE (it, options_.end ());
156
156
CHECK_EQ (it->second .type , kBoolean );
0 commit comments