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:
@@ -48,14 +48,14 @@ const SampleFormat &AudioRenderingParams::format() const
|
|||||||
return format_;
|
return format_;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioRenderingParams::operator==(const AudioRenderingParams &other)
|
bool AudioRenderingParams::operator==(const AudioRenderingParams &other) const
|
||||||
{
|
{
|
||||||
return (format() == other.format()
|
return (format() == other.format()
|
||||||
&& sample_rate() == other.sample_rate()
|
&& sample_rate() == other.sample_rate()
|
||||||
&& channel_layout() == other.channel_layout());
|
&& channel_layout() == other.channel_layout());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioRenderingParams::operator!=(const AudioRenderingParams &other)
|
bool AudioRenderingParams::operator!=(const AudioRenderingParams &other) const
|
||||||
{
|
{
|
||||||
return (format() != other.format()
|
return (format() != other.format()
|
||||||
|| sample_rate() != other.sample_rate()
|
|| sample_rate() != other.sample_rate()
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ public:
|
|||||||
|
|
||||||
const SampleFormat& format() const;
|
const SampleFormat& format() const;
|
||||||
|
|
||||||
bool operator==(const AudioRenderingParams& other);
|
bool operator==(const AudioRenderingParams& other) const;
|
||||||
bool operator!=(const AudioRenderingParams& other);
|
bool operator!=(const AudioRenderingParams& other) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SampleFormat format_;
|
SampleFormat format_;
|
||||||
|
|||||||
Reference in New Issue
Block a user