diff options
| -rw-r--r-- | src/qmmp/audioparameters.cpp | 3 | ||||
| -rw-r--r-- | src/qmmp/audioparameters.h | 2 | ||||
| -rw-r--r-- | src/qmmp/eqsettings.cpp | 5 | ||||
| -rw-r--r-- | src/qmmp/eqsettings.h | 4 | ||||
| -rw-r--r-- | src/qmmp/fileinfo.cpp | 5 | ||||
| -rw-r--r-- | src/qmmp/fileinfo.h | 4 |
6 files changed, 13 insertions, 10 deletions
diff --git a/src/qmmp/audioparameters.cpp b/src/qmmp/audioparameters.cpp index 9924479f6..33819f29a 100644 --- a/src/qmmp/audioparameters.cpp +++ b/src/qmmp/audioparameters.cpp @@ -44,12 +44,13 @@ AudioParameters::AudioParameters(quint32 srate, const ChannelMap &map, Qmmp::Aud m_sz = sampleSize(format); } -void AudioParameters::operator=(const AudioParameters &p) +AudioParameters &AudioParameters::operator=(const AudioParameters &p) { m_srate = p.sampleRate(); m_chan_map = p.channelMap(); m_format = p.format(); m_sz = p.sampleSize(); + return *this; } bool AudioParameters::operator==(const AudioParameters &p) const diff --git a/src/qmmp/audioparameters.h b/src/qmmp/audioparameters.h index beb13dd61..cdd3777d8 100644 --- a/src/qmmp/audioparameters.h +++ b/src/qmmp/audioparameters.h @@ -49,7 +49,7 @@ public: /*! * Assigns audio parameters \b p to this parameters. */ - void operator=(const AudioParameters &p); + AudioParameters &operator=(const AudioParameters &p); /*! * Returns \b true if parameters \b p is equal to this parameters; otherwise returns \b false. */ diff --git a/src/qmmp/eqsettings.cpp b/src/qmmp/eqsettings.cpp index 166da4e64..6bde4a177 100644 --- a/src/qmmp/eqsettings.cpp +++ b/src/qmmp/eqsettings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010-2012 by Ilya Kotov * + * Copyright (C) 2010-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -70,13 +70,14 @@ void EqSettings::setPreamp(double preamp) m_preamp = preamp; } -void EqSettings::operator=(const EqSettings &s) +EqSettings &EqSettings::operator=(const EqSettings &s) { for(int i = 0; i < m_bands; ++i) m_gains[i] = s.m_gains[i]; m_preamp = s.m_preamp; m_is_enabled = s.m_is_enabled; m_bands = s.m_bands; + return *this; } bool EqSettings::operator==(const EqSettings &s) const diff --git a/src/qmmp/eqsettings.h b/src/qmmp/eqsettings.h index c6418641e..a956c23e6 100644 --- a/src/qmmp/eqsettings.h +++ b/src/qmmp/eqsettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010-2012 by Ilya Kotov * + * Copyright (C) 2010-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -65,7 +65,7 @@ public: /*! * Assigns equalizer settings \b s to this settings. */ - void operator=(const EqSettings &s); + EqSettings &operator=(const EqSettings &s); /*! * Returns \b true if equalizer settins \b s is equal to this settings; otherwise returns false. */ diff --git a/src/qmmp/fileinfo.cpp b/src/qmmp/fileinfo.cpp index 463fbbbcc..a292f55e8 100644 --- a/src/qmmp/fileinfo.cpp +++ b/src/qmmp/fileinfo.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -34,11 +34,12 @@ FileInfo::FileInfo(const FileInfo &other) FileInfo::~FileInfo() {} -void FileInfo::operator=(const FileInfo &info) +FileInfo &FileInfo::operator=(const FileInfo &info) { setLength(info.length()); setMetaData(info.metaData()); setPath(info.path()); + return *this; } bool FileInfo::operator==(const FileInfo &info) diff --git a/src/qmmp/fileinfo.h b/src/qmmp/fileinfo.h index 3b146c757..aa1402d05 100644 --- a/src/qmmp/fileinfo.h +++ b/src/qmmp/fileinfo.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -47,7 +47,7 @@ public: /*! * Makes a copy of the given \b info */ - void operator=(const FileInfo &info); + FileInfo &operator=(const FileInfo &info); /*! * Returns \b true if this FileInfo object refers to \b info; otherwise returns \b false. */ |
