From c5f5e929045c0f17271a8a586e0bef52eadd3bbb Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 31 Jul 2020 12:12:51 +0200 Subject: Use explicit parens when checking assignments --- AudioFile.cpp | 4 ++-- 1 file 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; -- cgit v1.2.3-59-g8ed1b