summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-26 13:14:16 +0200
committerMax Kellermann <max@duempel.org>2013-10-26 13:49:15 +0200
commitb5e31c89c0217d89129cb4e6e1a1f4e5ef181b78 (patch)
treee69afaf4537c0bba748bf941c8a201bf8714bcd7
parente898400fbde2e72cbe6d24f6a76ab117c6e9c079 (diff)
CrossFade: merge "return" statements using "break"
-rw-r--r--src/CrossFade.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/CrossFade.cxx b/src/CrossFade.cxx
index c0d6ecd1a..647d13ee5 100644
--- a/src/CrossFade.cxx
+++ b/src/CrossFade.cxx
@@ -61,14 +61,14 @@ static float mixramp_interpolate(char *ramp_list, float required_db)
/* Parse the dB value. */
if (nullptr == ramp_str)
- return nan("");
+ break;
db = (float)atof(ramp_str);
/* Parse the time. */
ramp_str = strtok_r(nullptr, ";", &save_str);
if (nullptr == ramp_str)
- return nan("");
+ break;
secs = (float)atof(ramp_str);
@@ -92,6 +92,8 @@ static float mixramp_interpolate(char *ramp_list, float required_db)
secs = last_secs + (required_db - last_db) * (secs - last_secs) / (db - last_db);
return secs;
}
+
+ return nan("");
}
unsigned cross_fade_calc(float duration, float total_time,