[clang-tidy] use bool literals where appropriate

Found with modernize-use-bool-literals

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-01-31 20:04:44 -08:00
parent bc6eca2115
commit 9db3809c7b
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
3 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ mixramp_interpolate(const char *ramp_list, float required_db) noexcept
* between the dB and seconds of a pair.
* The dB values must be monotonically increasing for this to work. */
while (1) {
while (true) {
/* Parse the dB value. */
char *endptr;
const float db = ParseFloat(ramp_list, &endptr);

View File

@ -1155,7 +1155,7 @@ try {
std::unique_lock<Mutex> lock(mutex);
while (1) {
while (true) {
switch (command) {
case PlayerCommand::SEEK:
case PlayerCommand::QUEUE:

View File

@ -177,11 +177,11 @@ SoundCloudJsonData::EndMap() noexcept
{
if (got_url > 1) {
got_url--;
return 1;
return true;
}
if (got_url == 0)
return 1;
return true;
/* got_url == 1, track finished, make it into a song */
got_url = 0;