diff options
author | Max Kellermann <max@duempel.org> | 2013-10-26 13:16:10 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-26 13:49:15 +0200 |
commit | e898400fbde2e72cbe6d24f6a76ab117c6e9c079 (patch) | |
tree | cb3e5f56b5d4a0ba6e99545ec2b578b10c037801 /src/CrossFade.cxx | |
parent | 3ac7de7a223a2d29bc96ab850d37318c5435fd6d (diff) | |
download | mpd-e898400fbde2e72cbe6d24f6a76ab117c6e9c079.tar.gz mpd-e898400fbde2e72cbe6d24f6a76ab117c6e9c079.tar.xz mpd-e898400fbde2e72cbe6d24f6a76ab117c6e9c079.zip |
CrossFade: use nullptr instead of NULL
Diffstat (limited to 'src/CrossFade.cxx')
-rw-r--r-- | src/CrossFade.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/CrossFade.cxx b/src/CrossFade.cxx index 420276970..c0d6ecd1a 100644 --- a/src/CrossFade.cxx +++ b/src/CrossFade.cxx @@ -45,7 +45,7 @@ strtok_r(char *str, const char *delim, gcc_unused char **saveptr) static float mixramp_interpolate(char *ramp_list, float required_db) { float db, secs, last_db = nan(""), last_secs = 0; - char *ramp_str, *save_str = NULL; + char *ramp_str, *save_str = nullptr; /* ramp_list is a string of pairs of dBs and seconds that describe the * volume profile. Delimiters are semi-colons between pairs and spaces @@ -57,19 +57,19 @@ static float mixramp_interpolate(char *ramp_list, float required_db) ramp_str = strtok_r(ramp_list, " ", &save_str); /* Tell strtok to continue next time round. */ - ramp_list = NULL; + ramp_list = nullptr; /* Parse the dB value. */ - if (NULL == ramp_str) { + if (nullptr == ramp_str) return nan(""); - } + db = (float)atof(ramp_str); /* Parse the time. */ - ramp_str = strtok_r(NULL, ";", &save_str); - if (NULL == ramp_str) { + ramp_str = strtok_r(nullptr, ";", &save_str); + if (nullptr == ramp_str) return nan(""); - } + secs = (float)atof(ramp_str); /* Check for exact match. */ |