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

Unified Diff: webrtc/base/flags.cc

Issue 2325623002: webrtc/base: Use RTC_DCHECK() instead of assert() (Closed)
Patch Set: Created 4 years, 3 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/flags.h ('k') | webrtc/base/maccocoasocketserver.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/flags.cc
diff --git a/webrtc/base/flags.cc b/webrtc/base/flags.cc
index 248c5c3f185e974a00a34112ba69dd892467066b..a138b8fb9b6812c9e7d680d90de58de19504da1f 100644
--- a/webrtc/base/flags.cc
+++ b/webrtc/base/flags.cc
@@ -8,18 +8,19 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/base/flags.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "webrtc/base/checks.h"
#if defined(WEBRTC_WIN)
#include "webrtc/base/win32.h"
#include <shellapi.h>
#endif
-#include "webrtc/base/flags.h"
-
namespace rtc {
// -----------------------------------------------------------------------------
// Implementation of Flag
@@ -256,7 +257,8 @@ int FlagList::SetFlagsFromCommandLine(int* argc, const char** argv,
}
void FlagList::Register(Flag* flag) {
- assert(flag != NULL && strlen(flag->name()) > 0);
+ RTC_DCHECK(flag);
+ RTC_DCHECK_GT(strlen(flag->name()), 0u);
// NOTE: Don't call Lookup() within Register because it accesses the name_
// of other flags in list_, and if the flags are coming from two different
// compilation units, the initialization order between them is undefined, and
« no previous file with comments | « webrtc/base/flags.h ('k') | webrtc/base/maccocoasocketserver.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698