Fix: RefCountInterface: Make AddRef() and Release() const
The landed CL contained some unwanted changes.
TBR=tommi
Review URL: https://codereview.webrtc.org/1401743002 .
Cr-Commit-Position: refs/heads/master@{#10255}
diff --git a/talk/app/webrtc/dtmfsender_unittest.cc b/talk/app/webrtc/dtmfsender_unittest.cc
index ba2e163..f686aa2 100644
--- a/talk/app/webrtc/dtmfsender_unittest.cc
+++ b/talk/app/webrtc/dtmfsender_unittest.cc
@@ -34,7 +34,6 @@
#include "talk/app/webrtc/audiotrack.h"
#include "webrtc/base/gunit.h"
#include "webrtc/base/logging.h"
-#include "webrtc/base/refcount.h"
#include "webrtc/base/timeutils.h"
using webrtc::AudioTrackInterface;
@@ -46,7 +45,7 @@
static const char kTestAudioLabel[] = "test_audio_track";
static const int kMaxWaitMs = 3000;
-class FakeDtmfObserver : public DtmfSenderObserverInterface, RefCountInterface {
+class FakeDtmfObserver : public DtmfSenderObserverInterface {
public:
FakeDtmfObserver() : completed_(false) {}
diff --git a/webrtc/base/refcount.h b/webrtc/base/refcount.h
index dbad2eb..55ce23a 100644
--- a/webrtc/base/refcount.h
+++ b/webrtc/base/refcount.h
@@ -95,11 +95,11 @@
: T(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11), ref_count_(0) {
}
- int AddRef() const override {
+ virtual int AddRef() const {
return AtomicOps::Increment(&ref_count_);
}
- int Release() const override {
+ virtual int Release() const {
int count = AtomicOps::Decrement(&ref_count_);
if (!count) {
delete this;