Skip to content

Commit

Permalink
Deleting copy constructors for Scoped* classes.
Browse files Browse the repository at this point in the history
Bug: webrtc:10365
Change-Id: Ia670b7b1ac72eb19f9e30228fd023601e2fb8a88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128901
Commit-Queue: Sebastian Jansson <[email protected]>
Reviewed-by: Karl Wiberg <[email protected]>
Cr-Commit-Position: refs/heads/master@{#27259}
  • Loading branch information
jonex authored and Commit Bot committed Mar 25, 2019
1 parent 0cd9508 commit 9debe5a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ TEST_F(ProbeControllerTest, TestAllocatedBitrateCap) {
}

TEST_F(ProbeControllerTest, ConfigurableProbingFieldTrial) {
auto trials = test::ScopedFieldTrials(
test::ScopedFieldTrials trials(
"WebRTC-Bwe-ConfigurableProbing/"
"p1:2,p2:5,step_size:3,further_probe_threshold:0.8/");
probe_controller_.reset(
Expand Down
2 changes: 2 additions & 0 deletions rtc_base/fake_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class FakeClock : public ClockInterface {
class ScopedFakeClock : public FakeClock {
public:
ScopedFakeClock();
ScopedFakeClock(const ScopedFakeClock&) = delete;
ScopedFakeClock& operator=(const ScopedFakeClock&) = delete;
~ScopedFakeClock() override;

private:
Expand Down
2 changes: 2 additions & 0 deletions rtc_base/synchronization/yield_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class YieldInterface {
class ScopedYieldPolicy final {
public:
explicit ScopedYieldPolicy(YieldInterface* policy);
ScopedYieldPolicy(const ScopedYieldPolicy&) = delete;
ScopedYieldPolicy& operator=(const ScopedYieldPolicy&) = delete;
~ScopedYieldPolicy();
// Will yield as specified by the currently active thread-local yield policy
// (which by default is a no-op).
Expand Down
3 changes: 3 additions & 0 deletions rtc_base/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ class RTC_LOCKABLE Thread : public MessageQueue {
class ScopedDisallowBlockingCalls {
public:
ScopedDisallowBlockingCalls();
ScopedDisallowBlockingCalls(const ScopedDisallowBlockingCalls&) = delete;
ScopedDisallowBlockingCalls& operator=(const ScopedDisallowBlockingCalls&) =
delete;
~ScopedDisallowBlockingCalls();

private:
Expand Down
2 changes: 2 additions & 0 deletions test/field_trial.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ void ValidateFieldTrialsStringOrDie(const std::string& config);
class ScopedFieldTrials {
public:
explicit ScopedFieldTrials(const std::string& config);
ScopedFieldTrials(const ScopedFieldTrials&) = delete;
ScopedFieldTrials& operator=(const ScopedFieldTrials&) = delete;
~ScopedFieldTrials();

private:
Expand Down

0 comments on commit 9debe5a

Please sign in to comment.