Remove RTC_DISALLOW_COPY_AND_ASSIGN more.

Bug: webrtc:13555, webrtc:13082
Change-Id: I9c07708108da0a26f5e228384fd56cef4d1540b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247300
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35749}
This commit is contained in:
Byoungchan Lee
2022-01-18 09:35:48 +09:00
committed by WebRTC LUCI CQ
parent cf9899c518
commit c065e739e2
28 changed files with 100 additions and 86 deletions

View File

@ -11,7 +11,6 @@
#include <algorithm>
#include "rtc_base/constructor_magic.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"
@ -35,6 +34,9 @@ class RtcHistogram {
RTC_DCHECK_GT(bucket_count, 0);
}
RtcHistogram(const RtcHistogram&) = delete;
RtcHistogram& operator=(const RtcHistogram&) = delete;
void Add(int sample) {
sample = std::min(sample, max_);
sample = std::max(sample, min_ - 1); // Underflow bucket.
@ -99,8 +101,6 @@ class RtcHistogram {
const int min_;
const int max_;
SampleInfo info_ RTC_GUARDED_BY(mutex_);
RTC_DISALLOW_COPY_AND_ASSIGN(RtcHistogram);
};
class RtcHistogramMap {
@ -108,6 +108,9 @@ class RtcHistogramMap {
RtcHistogramMap() {}
~RtcHistogramMap() {}
RtcHistogramMap(const RtcHistogramMap&) = delete;
RtcHistogramMap& operator=(const RtcHistogramMap&) = delete;
Histogram* GetCountsHistogram(const std::string& name,
int min,
int max,
@ -178,8 +181,6 @@ class RtcHistogramMap {
mutable Mutex mutex_;
std::map<std::string, std::unique_ptr<RtcHistogram>> map_
RTC_GUARDED_BY(mutex_);
RTC_DISALLOW_COPY_AND_ASSIGN(RtcHistogramMap);
};
// RtcHistogramMap is allocated upon call to Enable().