Make CriticalSectionWrapper non-virtual.

There's no need for this class to have a vtable since there exists only a single implementation (per platform).  It's also not good for performance.

BUG=
R=pbos@webrtc.org

Review URL: https://codereview.webrtc.org/1601743004 .

Cr-Commit-Position: refs/heads/master@{#11306}
This commit is contained in:
Tommi
2016-01-19 15:42:45 +01:00
parent dd45eb6801
commit ee5a309f12
13 changed files with 115 additions and 223 deletions

View File

@ -85,10 +85,10 @@ class NetEqNetworkStatsTest : public NetEqExternalDecoderTest {
static const int kMaxOutputSize = 960; // 10 ms * 48 kHz * 2 channels.
enum logic {
IGNORE,
EQUAL,
SMALLER_THAN,
LARGER_THAN,
kIgnore,
kEqual,
kSmallerThan,
kLargerThan,
};
struct NetEqNetworkStatsCheck {
@ -143,13 +143,13 @@ struct NetEqNetworkStatsCheck {
#define CHECK_NETEQ_NETWORK_STATS(x)\
switch (expects.x) {\
case EQUAL:\
case kEqual:\
EXPECT_EQ(stats.x, expects.stats_ref.x);\
break;\
case SMALLER_THAN:\
case kSmallerThan:\
EXPECT_LT(stats.x, expects.stats_ref.x);\
break;\
case LARGER_THAN:\
case kLargerThan:\
EXPECT_GT(stats.x, expects.stats_ref.x);\
break;\
default:\
@ -204,18 +204,18 @@ struct NetEqNetworkStatsCheck {
void DecodeFecTest() {
external_decoder_->set_fec_enabled(false);
NetEqNetworkStatsCheck expects = {
IGNORE, // current_buffer_size_ms
IGNORE, // preferred_buffer_size_ms
IGNORE, // jitter_peaks_found
EQUAL, // packet_loss_rate
EQUAL, // packet_discard_rate
EQUAL, // expand_rate
EQUAL, // voice_expand_rate
IGNORE, // preemptive_rate
EQUAL, // accelerate_rate
EQUAL, // decoded_fec_rate
IGNORE, // clockdrift_ppm
EQUAL, // added_zero_samples
kIgnore, // current_buffer_size_ms
kIgnore, // preferred_buffer_size_ms
kIgnore, // jitter_peaks_found
kEqual, // packet_loss_rate
kEqual, // packet_discard_rate
kEqual, // expand_rate
kEqual, // voice_expand_rate
kIgnore, // preemptive_rate
kEqual, // accelerate_rate
kEqual, // decoded_fec_rate
kIgnore, // clockdrift_ppm
kEqual, // added_zero_samples
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
};
RunTest(50, expects);
@ -237,18 +237,18 @@ struct NetEqNetworkStatsCheck {
void NoiseExpansionTest() {
NetEqNetworkStatsCheck expects = {
IGNORE, // current_buffer_size_ms
IGNORE, // preferred_buffer_size_ms
IGNORE, // jitter_peaks_found
EQUAL, // packet_loss_rate
EQUAL, // packet_discard_rate
EQUAL, // expand_rate
EQUAL, // speech_expand_rate
IGNORE, // preemptive_rate
EQUAL, // accelerate_rate
EQUAL, // decoded_fec_rate
IGNORE, // clockdrift_ppm
EQUAL, // added_zero_samples
kIgnore, // current_buffer_size_ms
kIgnore, // preferred_buffer_size_ms
kIgnore, // jitter_peaks_found
kEqual, // packet_loss_rate
kEqual, // packet_discard_rate
kEqual, // expand_rate
kEqual, // speech_expand_rate
kIgnore, // preemptive_rate
kEqual, // accelerate_rate
kEqual, // decoded_fec_rate
kIgnore, // clockdrift_ppm
kEqual, // added_zero_samples
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
};
RunTest(50, expects);