diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-07-31 12:12:51 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-07-31 12:27:45 +0200 |
commit | c5f5e929045c0f17271a8a586e0bef52eadd3bbb (patch) | |
tree | 4bfbb1641d09b85b5afe1e8b892a540e1eb745da | |
parent | Abstract out binaries in makefile (diff) | |
download | music-file-organizer-c5f5e929045c0f17271a8a586e0bef52eadd3bbb.tar.xz music-file-organizer-c5f5e929045c0f17271a8a586e0bef52eadd3bbb.zip |
Use explicit parens when checking assignments
-rw-r--r-- | AudioFile.cpp | 4 |
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; |