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

Unified Diff: webrtc/base/diskcache.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, 2 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 | « no previous file | webrtc/base/logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/diskcache.cc
diff --git a/webrtc/base/diskcache.cc b/webrtc/base/diskcache.cc
index 6bbc53eb13f67c74a0cabe15e599e8c4876768a6..7bf1ba261dff1bf51864a083fd83c39487ba33ac 100644
--- a/webrtc/base/diskcache.cc
+++ b/webrtc/base/diskcache.cc
@@ -23,11 +23,11 @@
#include "webrtc/base/stringencode.h"
#include "webrtc/base/stringutils.h"
-#ifdef _DEBUG
+#if !defined(NDEBUG)
#define TRANSPARENT_CACHE_NAMES 1
-#else // !_DEBUG
+#else
#define TRANSPARENT_CACHE_NAMES 0
-#endif // !_DEBUG
+#endif
namespace rtc {
@@ -211,14 +211,14 @@ bool DiskCache::DeleteResource(const std::string& id) {
}
bool DiskCache::CheckLimit() {
-#ifdef _DEBUG
+#if !defined(NDEBUG)
// Temporary check to make sure everything is working correctly.
size_t cache_size = 0;
for (EntryMap::iterator it = map_.begin(); it != map_.end(); ++it) {
cache_size += it->second.size;
}
ASSERT(cache_size == total_size_);
-#endif // _DEBUG
+#endif
// TODO: Replace this with a non-brain-dead algorithm for clearing out the
// oldest resources... something that isn't O(n^2)
« no previous file with comments | « no previous file | webrtc/base/logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698