Remove custom constructors for AudioProcessing::Config.

This CL follows the "Rule of zero".

Those constructors made no sense compared to default generated ones,
since all members are POD.
They were introduced to quiet a memory sanitizer warning,
which apparently was misleading.

As a bonus, the struct is now movable.

Bug: webrtc:11180, webrtc:9855
Change-Id: Iff9fd950bec8040bc6e7e7ece33cc49c5f453f5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161381
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30023}
This commit is contained in:
Yves Gerey
2019-12-05 17:45:31 +01:00
committed by Commit Bot
parent 1256d9bcac
commit 1fce3f8e55
2 changed files with 9 additions and 16 deletions

View File

@ -2692,4 +2692,13 @@ TEST(ApmConfiguration, HandlingOfRateCombinations) {
capture_channel_counts);
}
TEST(ApmConfiguration, SelfAssignment) {
// At some point memory sanitizer was complaining about self-assigment.
// Make sure we don't regress.
AudioProcessing::Config config;
AudioProcessing::Config* config2 = &config;
*config2 = *config2; // Workaround -Wself-assign-overloaded
SUCCEED(); // Real success is absence of defects from asan/msan/ubsan.
}
} // namespace webrtc