Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_utility.cc

Issue 1429513004: Switch usage of _DEBUG macro to NDEBUG. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: REBASE Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 11 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
12 12
13 #include <assert.h> 13 #include <assert.h>
14 #include <math.h> // ceil 14 #include <math.h> // ceil
15 #include <string.h> // memcpy 15 #include <string.h> // memcpy
16 16
17 #if defined(_WIN32) 17 #if defined(_WIN32)
18 // Order for these headers are important 18 // Order for these headers are important
19 #include <winsock2.h> // timeval 19 #include <winsock2.h> // timeval
20 #include <windows.h> // FILETIME 20 #include <windows.h> // FILETIME
21 #include <MMSystem.h> // timeGetTime 21 #include <MMSystem.h> // timeGetTime
22 #elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC)) 22 #elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC))
23 #include <sys/time.h> // gettimeofday 23 #include <sys/time.h> // gettimeofday
24 #include <time.h> 24 #include <time.h>
25 #endif 25 #endif
26 #if (defined(_DEBUG) && defined(_WIN32) && (_MSC_VER >= 1400)) 26 #if (!defined(NDEBUG) && defined(_WIN32) && (_MSC_VER >= 1400))
27 #include <stdio.h> 27 #include <stdio.h>
28 #endif 28 #endif
29 29
30 #include "webrtc/base/logging.h" 30 #include "webrtc/base/logging.h"
31 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" 31 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
32 #include "webrtc/system_wrappers/include/tick_util.h" 32 #include "webrtc/system_wrappers/include/tick_util.h"
33 33
34 #if (defined(_DEBUG) && defined(_WIN32) && (_MSC_VER >= 1400)) 34 #if (!defined(NDEBUG) && defined(_WIN32) && (_MSC_VER >= 1400))
35 #define DEBUG_PRINT(...) \ 35 #define DEBUG_PRINT(...) \
36 { \ 36 { \
37 char msg[256]; \ 37 char msg[256]; \
38 sprintf(msg, __VA_ARGS__); \ 38 sprintf(msg, __VA_ARGS__); \
39 OutputDebugString(msg); \ 39 OutputDebugString(msg); \
40 } 40 }
41 #else 41 #else
42 // special fix for visual 2003 42 // special fix for visual 2003
43 #define DEBUG_PRINT(exp) ((void)0) 43 #define DEBUG_PRINT(exp) ((void)0)
44 #endif // defined(_DEBUG) && defined(_WIN32) 44 #endif // !defined(NDEBUG) && defined(_WIN32)
45 45
46 namespace webrtc { 46 namespace webrtc {
47 47
48 RtpData* NullObjectRtpData() { 48 RtpData* NullObjectRtpData() {
49 static NullRtpData null_rtp_data; 49 static NullRtpData null_rtp_data;
50 return &null_rtp_data; 50 return &null_rtp_data;
51 } 51 }
52 52
53 RtpFeedback* NullObjectRtpFeedback() { 53 RtpFeedback* NullObjectRtpFeedback() {
54 static NullRtpFeedback null_rtp_feedback; 54 static NullRtpFeedback null_rtp_feedback;
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 return num_zero_bytes; 497 return num_zero_bytes;
498 } 498 }
499 ptr++; 499 ptr++;
500 num_zero_bytes++; 500 num_zero_bytes++;
501 } 501 }
502 return num_zero_bytes; 502 return num_zero_bytes;
503 } 503 }
504 } // namespace RtpUtility 504 } // namespace RtpUtility
505 505
506 } // namespace webrtc 506 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698