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

Unified Diff: webrtc/base/win32.cc

Issue 2620303003: Replace ASSERT by RTC_DCHECK in all non-test code. (Closed)
Patch Set: Address final nits. Created 3 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/unixfilesystem.cc ('k') | webrtc/base/win32filesystem.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/win32.cc
diff --git a/webrtc/base/win32.cc b/webrtc/base/win32.cc
index 182b84f48283d46b65935ae8e9f29f0cbcbcdfe7..7dfff421cdde94d25d37a9d001f7381ca087122d 100644
--- a/webrtc/base/win32.cc
+++ b/webrtc/base/win32.cc
@@ -17,6 +17,7 @@
#include "webrtc/base/arraysize.h"
#include "webrtc/base/basictypes.h"
#include "webrtc/base/byteorder.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/common.h"
#include "webrtc/base/logging.h"
@@ -318,7 +319,7 @@ int inet_pton_v6(const char* src, void* dst) {
//
void FileTimeToUnixTime(const FILETIME& ft, time_t* ut) {
- ASSERT(NULL != ut);
+ RTC_DCHECK(NULL != ut);
// FILETIME has an earlier date base than time_t (1/1/1970), so subtract off
// the difference.
@@ -342,7 +343,7 @@ void FileTimeToUnixTime(const FILETIME& ft, time_t* ut) {
}
void UnixTimeToFileTime(const time_t& ut, FILETIME* ft) {
- ASSERT(NULL != ft);
+ RTC_DCHECK(NULL != ft);
// FILETIME has an earlier date base than time_t (1/1/1970), so add in
// the difference.
@@ -404,13 +405,13 @@ bool Utf8ToWindowsFilename(const std::string& utf8, std::wstring* filename) {
// Non-unc path: <pathname>
// Becomes: \\?\<pathname>
start -= 4;
- ASSERT(start >= full_filename);
+ RTC_DCHECK(start >= full_filename);
memcpy(start, kLongPathPrefix, 4 * sizeof(wchar_t));
} else if (start[2] != L'?') {
// Unc path: \\<server>\<pathname>
// Becomes: \\?\UNC\<server>\<pathname>
start -= 6;
- ASSERT(start >= full_filename);
+ RTC_DCHECK(start >= full_filename);
memcpy(start, kLongPathPrefix, 7 * sizeof(wchar_t));
} else {
// Already in long-path form.
« no previous file with comments | « webrtc/base/unixfilesystem.cc ('k') | webrtc/base/win32filesystem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698