aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-07-31 12:12:51 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-07-31 12:27:45 +0200
commitc5f5e929045c0f17271a8a586e0bef52eadd3bbb (patch)
tree4bfbb1641d09b85b5afe1e8b892a540e1eb745da
parentAbstract out binaries in makefile (diff)
downloadmusic-file-organizer-c5f5e929045c0f17271a8a586e0bef52eadd3bbb.tar.xz
music-file-organizer-c5f5e929045c0f17271a8a586e0bef52eadd3bbb.zip
Use explicit parens when checking assignments
-rw-r--r--AudioFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/AudioFile.cpp b/AudioFile.cpp
index 661d662..a309a75 100644
--- a/AudioFile.cpp
+++ b/AudioFile.cpp
@@ -209,11 +209,11 @@ AudioFile::AudioFile(const std::string &filename) :
bool AudioFile::operator<(const AudioFile &other) const
{
int comp;
- if (comp = m_artist.compare(other.m_artist))
+ if ((comp = m_artist.compare(other.m_artist)))
return comp < 0;
if (m_year != other.m_year)
return m_year < other.m_year;
- if (comp = m_album.compare(other.m_album))
+ if ((comp = m_album.compare(other.m_album)))
return comp < 0;
if (m_track != other.m_track)
return m_track < other.m_track;