Use defaulted comparison operators in C++ (#4723)

Comparison operators which compared against every class member variable
now use C++20's default comparison operators.

Also remove operator!= that in C++20 is now auto-generated from operator==.
This commit is contained in:
Tyler Veness
2022-11-27 21:01:01 -08:00
committed by GitHub
parent 135c13958f
commit 42b6d4e3f7
39 changed files with 25 additions and 367 deletions

View File

@@ -90,8 +90,6 @@ struct VideoMode : public CS_VideoMode {
return pixelFormat == other.pixelFormat && width == other.width &&
height == other.height && fps == other.fps;
}
bool operator!=(const VideoMode& other) const { return !(*this == other); }
};
/**

View File

@@ -140,8 +140,6 @@ class VideoSource {
return m_handle == other.m_handle;
}
bool operator!=(const VideoSource& other) const { return !(*this == other); }
/**
* Get the kind of the source.
*/
@@ -736,8 +734,6 @@ class VideoSink {
return m_handle == other.m_handle;
}
bool operator!=(const VideoSink& other) const { return !(*this == other); }
/**
* Get the kind of the sink.
*/