From b5e31c89c0217d89129cb4e6e1a1f4e5ef181b78 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 26 Oct 2013 13:14:16 +0200 Subject: [PATCH] CrossFade: merge "return" statements using "break" --- src/CrossFade.cxx | 6 ++++-- 1 file 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,