From 8e4401b5a0cdbb33d7d7fb2547464724411c3ee2 Mon Sep 17 00:00:00 2001 From: "kwiberg@webrtc.org" Date: Tue, 3 Jun 2014 10:04:13 +0000 Subject: [PATCH] Reformat integer accessors to look like their float counterparts The new format is at least as easy to read, and takes less space. BUG= R=aluebs@webrtc.org, bjornv@webrtc.org Review URL: https://webrtc-codereview.appspot.com/16539004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6311 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_processing/audio_buffer.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/webrtc/modules/audio_processing/audio_buffer.cc b/webrtc/modules/audio_processing/audio_buffer.cc index 395e3ba078..b0f1eb6c1d 100644 --- a/webrtc/modules/audio_processing/audio_buffer.cc +++ b/webrtc/modules/audio_processing/audio_buffer.cc @@ -301,11 +301,8 @@ float* AudioBuffer::data_f(int channel) { const int16_t* AudioBuffer::low_pass_split_data(int channel) const { assert(channel >= 0 && channel < num_proc_channels_); - if (split_channels_.get() == NULL) { - return data(channel); - } - - return split_channels_->low_channel(channel); + return split_channels_.get() ? split_channels_->low_channel(channel) + : data(channel); } int16_t* AudioBuffer::low_pass_split_data(int channel) { @@ -321,11 +318,7 @@ float* AudioBuffer::low_pass_split_data_f(int channel) { const int16_t* AudioBuffer::high_pass_split_data(int channel) const { assert(channel >= 0 && channel < num_proc_channels_); - if (split_channels_.get() == NULL) { - return NULL; - } - - return split_channels_->high_channel(channel); + return split_channels_.get() ? split_channels_->high_channel(channel) : NULL; } int16_t* AudioBuffer::high_pass_split_data(int channel) {