@@ -198,10 +198,12 @@ struct MultiParamRange
198
198
static MultiParam ParseParam (const String &in)
199
199
{
200
200
MultiParam ret;
201
- if (in.find (' . ' ) != -1 )
201
+ if (in.find (" % " ) != -1 )
202
202
{
203
203
ret.type = MultiParam::Float;
204
- sscanf (*in, " %f" , &ret.fval );
204
+ int percentage = 0 ;
205
+ sscanf (*in, " %i" , &percentage);
206
+ ret.fval = percentage / 100.0 ;
205
207
}
206
208
else if (in.find (' /' ) != -1 )
207
209
{
@@ -215,12 +217,10 @@ static MultiParam ParseParam(const String &in)
215
217
ret.type = MultiParam::Samples;
216
218
sscanf (*in, " %i" , &ret.ival );
217
219
}
218
- else if (in.find (" % " ) != -1 )
220
+ else if (in.find (' . ' ) != -1 )
219
221
{
220
222
ret.type = MultiParam::Float;
221
- int percentage = 0 ;
222
- sscanf (*in, " %i" , &percentage);
223
- ret.fval = percentage / 100.0 ;
223
+ sscanf (*in, " %f" , &ret.fval );
224
224
}
225
225
else
226
226
{
@@ -236,7 +236,7 @@ AudioEffect ParseCustomEffect(const KShootEffectDefinition &def, Vector<String>
236
236
bool typeSet = false ;
237
237
238
238
Map<String, MultiParamRange> params;
239
- for (auto s : def.parameters )
239
+ for (const auto & s : def.parameters )
240
240
{
241
241
// This one is easy
242
242
if (s.first == " type" )
0 commit comments