@@ -90,7 +90,7 @@ struct InlineSchema {
90
90
* Construct an implicit inline schema if enabled is true, i.e., one where
91
91
* only the name itself is sufficient.
92
92
*
93
- * If possible, it is recommended to use InlineSchema(std::string&& ) instead.
93
+ * If possible, it is recommended to use InlineSchema(std::string) instead.
94
94
* This constructor is primarily useful when you want to explicitly disable
95
95
* an inline schema.
96
96
*/
@@ -99,14 +99,14 @@ struct InlineSchema {
99
99
/* *
100
100
* Construct an implicit inline schema with the given description.
101
101
*/
102
- explicit InlineSchema (std::string&& desc) : required_(false ), desc_(std::move(desc)) {}
102
+ explicit InlineSchema (std::string desc) : required_(false ), desc_(std::move(desc)) {}
103
103
104
104
/* *
105
105
* Construct an inline schema that takes a particular primitive type.
106
106
*
107
107
* The type may not be null, object, or array.
108
108
*/
109
- InlineSchema (std::string&& desc, fable::JsonType type, bool required = true );
109
+ InlineSchema (std::string desc, fable::JsonType type, bool required = true );
110
110
111
111
/* *
112
112
* Construct an inline schema that takes a string with the given format.
@@ -131,7 +131,7 @@ struct InlineSchema {
131
131
* ambiguity but should be used sparingly (for now, as usage is often
132
132
* directly read from JSON).
133
133
*/
134
- InlineSchema (std::string&& desc, std::string&& format, bool required = true )
134
+ InlineSchema (std::string desc, std::string format, bool required = true )
135
135
: type_(fable::JsonType::string)
136
136
, required_(required)
137
137
, usage_(std::move(format))
@@ -221,52 +221,42 @@ struct TriggerSchema {
221
221
* "name": "stop"
222
222
* }
223
223
*/
224
- TriggerSchema (const std::string& name, const std::string& desc)
225
- : name_(name), schema_(std::string (desc)), inline_(true ) {}
224
+ TriggerSchema (std::string name, std::string desc)
225
+ : name_(std::move( name)) , schema_(std::move (desc)), inline_(true ) {}
226
226
227
227
/* *
228
228
* Construct a TriggerSchema that describes a trigger with parameters
229
229
* but no inline format.
230
230
*/
231
- TriggerSchema (const std::string& name, const std::string& desc,
232
- fable::schema::PropertyList<> props)
233
- : name_(name), schema_(std::string(desc), props), inline_(false ) {}
231
+ TriggerSchema (std::string name, std::string desc, fable::schema::PropertyList<> props)
232
+ : name_(std::move(name)), schema_(std::move(desc), std::move(props)), inline_(false ) {}
234
233
235
234
/* *
236
235
* Construct a TriggerSchema that describes a trigger with the given Schema
237
236
* but no inline format.
238
237
*/
239
- TriggerSchema (const std::string& name, const std::string& desc, Schema&& s)
240
- : name_(name), schema_(std::move(s)), inline_(false ) {
241
- schema_.set_description (desc);
238
+ TriggerSchema (std::string name, std::string desc, Schema s)
239
+ : name_(std::move( name) ), schema_(std::move(s)), inline_(false ) {
240
+ schema_.set_description (std::move ( desc) );
242
241
}
243
242
244
243
/* *
245
244
* Construct a TriggerSchema that describes a trigger with parameters
246
245
* and a specified inline format.
247
246
*/
248
- TriggerSchema (const std::string& name, const std::string& desc, InlineSchema&& usage,
247
+ TriggerSchema (std::string name, std::string desc, InlineSchema usage,
249
248
fable::schema::PropertyList<> props)
250
- : name_(name), schema_(std::string(desc), props), inline_(std::move(usage)) {}
251
-
252
- /* *
253
- * Construct a TriggerSchema that describes a trigger with the given Schema
254
- * and a specified inline format.
255
- */
256
- TriggerSchema (const std::string& name, const std::string& desc, InlineSchema&& usage,
257
- Schema&& init)
258
- : name_(name), schema_(std::move(init)), inline_(std::move(usage)) {
259
- schema_.set_description (desc);
260
- }
249
+ : name_(std::move(name))
250
+ , schema_(std::move(desc), std::move(props))
251
+ , inline_(std::move(usage)) {}
261
252
262
253
/* *
263
254
* Construct a TriggerSchema that describes a trigger with the given Schema
264
255
* and a specified inline format.
265
256
*/
266
- TriggerSchema (const std::string& name, const std::string& desc, InlineSchema&& usage,
267
- const Schema& init)
268
- : name_(name), schema_(init), inline_(std::move(usage)) {
269
- schema_.set_description (desc);
257
+ TriggerSchema (std::string name, std::string desc, InlineSchema usage, Schema init)
258
+ : name_(std::move(name)), schema_(std::move(init)), inline_(std::move(usage)) {
259
+ schema_.set_description (std::move (desc));
270
260
}
271
261
272
262
const std::string& name () const { return name_; }
0 commit comments