@@ -90,7 +90,7 @@ struct InlineSchema {
9090 * Construct an implicit inline schema if enabled is true, i.e., one where
9191 * only the name itself is sufficient.
9292 *
93- * If possible, it is recommended to use InlineSchema(std::string&& ) instead.
93+ * If possible, it is recommended to use InlineSchema(std::string) instead.
9494 * This constructor is primarily useful when you want to explicitly disable
9595 * an inline schema.
9696 */
@@ -99,14 +99,14 @@ struct InlineSchema {
9999 /* *
100100 * Construct an implicit inline schema with the given description.
101101 */
102- explicit InlineSchema (std::string&& desc) : required_(false ), desc_(std::move(desc)) {}
102+ explicit InlineSchema (std::string desc) : required_(false ), desc_(std::move(desc)) {}
103103
104104 /* *
105105 * Construct an inline schema that takes a particular primitive type.
106106 *
107107 * The type may not be null, object, or array.
108108 */
109- InlineSchema (std::string&& desc, fable::JsonType type, bool required = true );
109+ InlineSchema (std::string desc, fable::JsonType type, bool required = true );
110110
111111 /* *
112112 * Construct an inline schema that takes a string with the given format.
@@ -131,7 +131,7 @@ struct InlineSchema {
131131 * ambiguity but should be used sparingly (for now, as usage is often
132132 * directly read from JSON).
133133 */
134- InlineSchema (std::string&& desc, std::string&& format, bool required = true )
134+ InlineSchema (std::string desc, std::string format, bool required = true )
135135 : type_(fable::JsonType::string)
136136 , required_(required)
137137 , usage_(std::move(format))
@@ -221,52 +221,42 @@ struct TriggerSchema {
221221 * "name": "stop"
222222 * }
223223 */
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 ) {}
226226
227227 /* *
228228 * Construct a TriggerSchema that describes a trigger with parameters
229229 * but no inline format.
230230 */
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 ) {}
234233
235234 /* *
236235 * Construct a TriggerSchema that describes a trigger with the given Schema
237236 * but no inline format.
238237 */
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) );
242241 }
243242
244243 /* *
245244 * Construct a TriggerSchema that describes a trigger with parameters
246245 * and a specified inline format.
247246 */
248- TriggerSchema (const std::string& name, const std::string& desc, InlineSchema&& usage,
247+ TriggerSchema (std::string name, std::string desc, InlineSchema usage,
249248 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)) {}
261252
262253 /* *
263254 * Construct a TriggerSchema that describes a trigger with the given Schema
264255 * and a specified inline format.
265256 */
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));
270260 }
271261
272262 const std::string& name () const { return name_; }
0 commit comments