mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Remove all #include <assert.h>/<cassert> and usage in Obj-C code.
This CL completes the removal of assert() and relative headers from the codebase (excluded //examples/objc/AppRTCMobile/third_party/SocketRocket which is in a third_party sub-directory). Bug: webrtc:6779 Change-Id: I93ed57168d2c0e011626873d66529488c5f484f2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225546 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34528}
This commit is contained in:
parent
0e62f7aa98
commit
190244bb59
59 changed files with 12 additions and 67 deletions
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "api/audio_codecs/audio_decoder.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/acm2/acm_resampler.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "rtc_base/logging.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/acm2/acm_send_test.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/include/audio_coding_module.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/accelerate.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "api/array_view.h"
|
||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <array>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/audio_vector.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/background_noise.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h> // memcpy
|
||||
|
||||
#include <algorithm> // min, max
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/comfort_noise.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/decision_logic.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/delay_manager.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/dsp_helper.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h> // Access to memset.
|
||||
|
||||
#include <algorithm> // Access to min, max.
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/expand.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h> // memset
|
||||
|
||||
#include <algorithm> // min, max
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#ifndef MODULES_AUDIO_CODING_NETEQ_EXPAND_H_
|
||||
#define MODULES_AUDIO_CODING_NETEQ_EXPAND_H_
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/merge.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h> // memmove, memcpy, memset, size_t
|
||||
|
||||
#include <algorithm> // min, max
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/nack_tracker.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/neteq_impl.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/red_payload_splitter.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <cstdint>
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/red_payload_splitter.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <memory>
|
||||
#include <utility> // pair
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/statistics_calculator.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h> // memset
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#ifndef MODULES_AUDIO_CODING_NETEQ_TIME_STRETCH_H_
|
||||
#define MODULES_AUDIO_CODING_NETEQ_TIME_STRETCH_H_
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h> // memset, size_t
|
||||
|
||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#ifndef MODULES_AUDIO_CODING_NETEQ_TOOLS_OUTPUT_AUDIO_FILE_H_
|
||||
#define MODULES_AUDIO_CODING_NETEQ_TOOLS_OUTPUT_AUDIO_FILE_H_
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <memory>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/tools/rtp_file_source.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/neteq/tools/rtp_generator.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_coding/test/Channel.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/audio_device/linux/audio_device_alsa_linux.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "modules/audio_device/audio_device_config.h"
|
||||
#include "rtc_base/logging.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include "modules/audio_device/win/audio_device_core_win.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <comdef.h>
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include <algorithm>
|
||||
#include <Cocoa/Cocoa.h>
|
||||
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_7) || \
|
||||
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
|
||||
|
||||
|
@ -40,7 +42,7 @@ DesktopRect NSRectToDesktopRect(const NSRect& ns_rect) {
|
|||
// relative to |bounds|.
|
||||
void InvertRectYOrigin(const DesktopRect& bounds,
|
||||
DesktopRect* rect) {
|
||||
assert(bounds.top() == 0);
|
||||
RTC_DCHECK_EQ(bounds.top(), 0);
|
||||
*rect = DesktopRect::MakeXYWH(
|
||||
rect->left(), bounds.bottom() - rect->bottom(),
|
||||
rect->width(), rect->height());
|
||||
|
@ -106,7 +108,7 @@ MacDesktopConfiguration MacDesktopConfiguration::GetCurrent(Origin origin) {
|
|||
MacDesktopConfiguration desktop_config;
|
||||
|
||||
NSArray* screens = [NSScreen screens];
|
||||
assert(screens);
|
||||
RTC_DCHECK(screens);
|
||||
|
||||
// Iterator over the monitors, adding the primary monitor and monitors whose
|
||||
// DPI match that of the primary monitor.
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/desktop_capture/mouse_cursor_monitor.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
@ -26,6 +25,7 @@
|
|||
#include "modules/desktop_capture/mac/desktop_configuration_monitor.h"
|
||||
#include "modules/desktop_capture/mac/window_list_utils.h"
|
||||
#include "modules/desktop_capture/mouse_cursor.h"
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
|
@ -88,21 +88,21 @@ MouseCursorMonitorMac::MouseCursorMonitorMac(const DesktopCaptureOptions& option
|
|||
screen_id_(screen_id),
|
||||
callback_(NULL),
|
||||
mode_(SHAPE_AND_POSITION) {
|
||||
assert(window_id == kCGNullWindowID || screen_id == kInvalidScreenId);
|
||||
RTC_DCHECK(window_id == kCGNullWindowID || screen_id == kInvalidScreenId);
|
||||
}
|
||||
|
||||
MouseCursorMonitorMac::~MouseCursorMonitorMac() {}
|
||||
|
||||
void MouseCursorMonitorMac::Init(Callback* callback, Mode mode) {
|
||||
assert(!callback_);
|
||||
assert(callback);
|
||||
RTC_DCHECK(!callback_);
|
||||
RTC_DCHECK(callback);
|
||||
|
||||
callback_ = callback;
|
||||
mode_ = mode;
|
||||
}
|
||||
|
||||
void MouseCursorMonitorMac::Capture() {
|
||||
assert(callback_);
|
||||
RTC_DCHECK(callback_);
|
||||
|
||||
CGEventRef event = CGEventCreate(NULL);
|
||||
CGPoint gc_position = CGEventGetLocation(event);
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/desktop_capture/mouse_cursor_monitor.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <memory>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <memory>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/desktop_capture/screen_capturer_helper.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
@ -24,6 +23,7 @@
|
|||
#include "modules/desktop_capture/mac/desktop_frame_cgimage.h"
|
||||
#include "modules/desktop_capture/mac/window_list_utils.h"
|
||||
#include "modules/desktop_capture/window_finder_mac.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/constructor_magic.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/trace_event.h"
|
||||
|
@ -142,8 +142,8 @@ bool WindowCapturerMac::IsOccluded(const DesktopVector& pos) {
|
|||
}
|
||||
|
||||
void WindowCapturerMac::Start(Callback* callback) {
|
||||
assert(!callback_);
|
||||
assert(callback);
|
||||
RTC_DCHECK(!callback_);
|
||||
RTC_DCHECK(callback);
|
||||
|
||||
callback_ = callback;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <inttypes.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
#include "modules/remote_bitrate_estimator/inter_arrival.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "modules/include/module_common_types_public.h"
|
||||
#include "rtc_base/logging.h"
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/remote_bitrate_estimator/overuse_estimator.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/rtp_rtcp/source/rtp_format_video_generic.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/rtp_rtcp/source/rtp_utility.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "modules/utility/include/helpers_android.h"
|
||||
|
||||
#include <android/log.h>
|
||||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/video_capture/device_info_impl.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "absl/strings/match.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/video_capture/windows/device_info_ds.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <dvdmedia.h>
|
||||
|
||||
#include "modules/video_capture/video_capture_config.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#ifndef MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_GLOBALS_H_
|
||||
#define MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_GLOBALS_H_
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "modules/video_coding/codecs/interface/common_constants.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/video_coding/frame_buffer.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "api/video/encoded_image.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
*/
|
||||
#include "modules/video_coding/jitter_buffer.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/video_coding/jitter_estimator.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/video_coding/media_opt_util.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/video_coding/receiver.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/video_coding/session_info.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "modules/video_coding/timing.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
1
rtc_base/third_party/base64/base64.cc
vendored
1
rtc_base/third_party/base64/base64.cc
vendored
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "rtc_base/third_party/base64/base64.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "rtc_base/checks.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "test/field_trial.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <map>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "test/frame_generator.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace webrtc {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "test/rtp_file_reader.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <map>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "test/testsupport/file_utils.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#if defined(WEBRTC_POSIX)
|
||||
#include <unistd.h>
|
||||
|
|
Loading…
Reference in a new issue