cpp binding: make operator == and != const. thanks to Riot for this patch. ticket #230
This commit is contained in:
parent
7f4f7e44cb
commit
83056ee196
6 changed files with 12 additions and 12 deletions
|
|
@ -60,8 +60,8 @@ namespace portaudio
|
|||
bool isHostApiDefaultInputDevice() const; // extended
|
||||
bool isHostApiDefaultOutputDevice() const; // extended
|
||||
|
||||
bool operator==(const Device &rhs);
|
||||
bool operator!=(const Device &rhs);
|
||||
bool operator==(const Device &rhs) const;
|
||||
bool operator!=(const Device &rhs) const;
|
||||
|
||||
// host api reference
|
||||
HostApi &hostApi();
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ namespace portaudio
|
|||
DeviceIterator &operator--();
|
||||
DeviceIterator operator--(int);
|
||||
|
||||
bool operator==(const DeviceIterator &rhs);
|
||||
bool operator!=(const DeviceIterator &rhs);
|
||||
bool operator==(const DeviceIterator &rhs) const;
|
||||
bool operator!=(const DeviceIterator &rhs) const;
|
||||
|
||||
private:
|
||||
friend class System;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ namespace portaudio
|
|||
HostApiIterator &operator--();
|
||||
HostApiIterator operator--(int);
|
||||
|
||||
bool operator==(const HostApiIterator &rhs);
|
||||
bool operator!=(const HostApiIterator &rhs);
|
||||
bool operator==(const HostApiIterator &rhs) const;
|
||||
bool operator!=(const HostApiIterator &rhs) const;
|
||||
|
||||
private:
|
||||
friend class System;
|
||||
|
|
|
|||
|
|
@ -131,12 +131,12 @@ namespace portaudio
|
|||
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
bool Device::operator==(const Device &rhs)
|
||||
bool Device::operator==(const Device &rhs) const
|
||||
{
|
||||
return (index_ == rhs.index_);
|
||||
}
|
||||
|
||||
bool Device::operator!=(const Device &rhs)
|
||||
bool Device::operator!=(const Device &rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ namespace portaudio
|
|||
|
||||
// -----------------------------------------------------------------------------------
|
||||
|
||||
bool System::DeviceIterator::operator==(const System::DeviceIterator &rhs)
|
||||
bool System::DeviceIterator::operator==(const System::DeviceIterator &rhs) const
|
||||
{
|
||||
return (ptr_ == rhs.ptr_);
|
||||
}
|
||||
|
||||
bool System::DeviceIterator::operator!=(const System::DeviceIterator &rhs)
|
||||
bool System::DeviceIterator::operator!=(const System::DeviceIterator &rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ namespace portaudio
|
|||
|
||||
// -----------------------------------------------------------------------------------
|
||||
|
||||
bool System::HostApiIterator::operator==(const System::HostApiIterator &rhs)
|
||||
bool System::HostApiIterator::operator==(const System::HostApiIterator &rhs) const
|
||||
{
|
||||
return (ptr_ == rhs.ptr_);
|
||||
}
|
||||
|
||||
bool System::HostApiIterator::operator!=(const System::HostApiIterator &rhs)
|
||||
bool System::HostApiIterator::operator!=(const System::HostApiIterator &rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue