made audiorenderingparams == operators const

There's no reason these functions shouldn't be const and we need to access it
in situations where instances of this class are const.
This commit is contained in:
itsmattkc
2019-11-30 02:50:50 +11:00
parent c19cf8f8e6
commit 2b273e44c5
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -48,14 +48,14 @@ const SampleFormat &AudioRenderingParams::format() const
return format_;
}
bool AudioRenderingParams::operator==(const AudioRenderingParams &other)
bool AudioRenderingParams::operator==(const AudioRenderingParams &other) const
{
return (format() == other.format()
&& sample_rate() == other.sample_rate()
&& channel_layout() == other.channel_layout());
}
bool AudioRenderingParams::operator!=(const AudioRenderingParams &other)
bool AudioRenderingParams::operator!=(const AudioRenderingParams &other) const
{
return (format() != other.format()
|| sample_rate() != other.sample_rate()
+2 -2
View File
@@ -39,8 +39,8 @@ public:
const SampleFormat& format() const;
bool operator==(const AudioRenderingParams& other);
bool operator!=(const AudioRenderingParams& other);
bool operator==(const AudioRenderingParams& other) const;
bool operator!=(const AudioRenderingParams& other) const;
private:
SampleFormat format_;