Add explicit copy constructors and assign operators for some classes.
Xcode 12.5 triggers some warnings for -Wdeprecated-copy, and I believe it is better to fix this problem than to suppress this warning. Bug: webrtc:12749 Change-Id: I5ca5fd8fdcae18fe7d3941f78b3366b5f03b8c00 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218400 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33990}
This commit is contained in:
parent
085eceb9ec
commit
917dcbab65
@ -30,7 +30,8 @@ class TestCodec : public Codec {
|
||||
TestCodec(int id, const std::string& name, int clockrate)
|
||||
: Codec(id, name, clockrate) {}
|
||||
TestCodec() : Codec() {}
|
||||
TestCodec(const TestCodec& c) : Codec(c) {}
|
||||
TestCodec(const TestCodec& c) = default;
|
||||
TestCodec& operator=(const TestCodec& c) = default;
|
||||
};
|
||||
|
||||
TEST(CodecTest, TestCodecOperators) {
|
||||
|
||||
@ -103,9 +103,6 @@ SSLFingerprint::SSLFingerprint(const std::string& algorithm,
|
||||
size_t digest_len)
|
||||
: SSLFingerprint(algorithm, MakeArrayView(digest_in, digest_len)) {}
|
||||
|
||||
SSLFingerprint::SSLFingerprint(const SSLFingerprint& from)
|
||||
: algorithm(from.algorithm), digest(from.digest) {}
|
||||
|
||||
bool SSLFingerprint::operator==(const SSLFingerprint& other) const {
|
||||
return algorithm == other.algorithm && digest == other.digest;
|
||||
}
|
||||
|
||||
@ -57,7 +57,8 @@ struct RTC_EXPORT SSLFingerprint {
|
||||
const uint8_t* digest_in,
|
||||
size_t digest_len);
|
||||
|
||||
SSLFingerprint(const SSLFingerprint& from);
|
||||
SSLFingerprint(const SSLFingerprint& from) = default;
|
||||
SSLFingerprint& operator=(const SSLFingerprint& from) = default;
|
||||
|
||||
bool operator==(const SSLFingerprint& other) const;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user