summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-01-31 20:04:44 -0800
committerRosen Penev <rosenp@gmail.com>2020-02-01 19:45:33 -0800
commit9db3809c7b46bce1b154c20900feb37d239644c5 (patch)
treef92f55b6f568c16874fbcc8ba0cdc02f84696cc5 /src
parentbc6eca2115d8d333eed61d23a01958926bbd7a9c (diff)
[clang-tidy] use bool literals where appropriate
Found with modernize-use-bool-literals Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/player/CrossFade.cxx2
-rw-r--r--src/player/Thread.cxx2
-rw-r--r--src/playlist/plugins/SoundCloudPlaylistPlugin.cxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/player/CrossFade.cxx b/src/player/CrossFade.cxx
index 7efed3e55..ce86d3f0a 100644
--- a/src/player/CrossFade.cxx
+++ b/src/player/CrossFade.cxx
@@ -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);
diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx
index 9af45352b..6a3a90963 100644
--- a/src/player/Thread.cxx
+++ b/src/player/Thread.cxx
@@ -1155,7 +1155,7 @@ try {
std::unique_lock<Mutex> lock(mutex);
- while (1) {
+ while (true) {
switch (command) {
case PlayerCommand::SEEK:
case PlayerCommand::QUEUE:
diff --git a/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx b/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
index 454ba2ba4..0f23b2df8 100644
--- a/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
+++ b/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
@@ -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;