[clang-tidy] use bool literals where appropriate

Found with modernize-use-bool-literals Signed-off-by: 's avatarRosen Penev <rosenp@gmail.com>
parent bc6eca21
...@@ -44,7 +44,7 @@ mixramp_interpolate(const char *ramp_list, float required_db) noexcept ...@@ -44,7 +44,7 @@ mixramp_interpolate(const char *ramp_list, float required_db) noexcept
* between the dB and seconds of a pair. * between the dB and seconds of a pair.
* The dB values must be monotonically increasing for this to work. */ * The dB values must be monotonically increasing for this to work. */
while (1) { while (true) {
/* Parse the dB value. */ /* Parse the dB value. */
char *endptr; char *endptr;
const float db = ParseFloat(ramp_list, &endptr); const float db = ParseFloat(ramp_list, &endptr);
......
...@@ -1155,7 +1155,7 @@ try { ...@@ -1155,7 +1155,7 @@ try {
std::unique_lock<Mutex> lock(mutex); std::unique_lock<Mutex> lock(mutex);
while (1) { while (true) {
switch (command) { switch (command) {
case PlayerCommand::SEEK: case PlayerCommand::SEEK:
case PlayerCommand::QUEUE: case PlayerCommand::QUEUE:
......
...@@ -177,11 +177,11 @@ SoundCloudJsonData::EndMap() noexcept ...@@ -177,11 +177,11 @@ SoundCloudJsonData::EndMap() noexcept
{ {
if (got_url > 1) { if (got_url > 1) {
got_url--; got_url--;
return 1; return true;
} }
if (got_url == 0) if (got_url == 0)
return 1; return true;
/* got_url == 1, track finished, make it into a song */ /* got_url == 1, track finished, make it into a song */
got_url = 0; got_url = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment