Add a target for the approved subset of rtc_base.
rtc_base drags in a bunch of unwieldly dependencies (e.g. nss and
json) not required for standalone webrtc (aka rtc/media). The root of
the problem appears to be that MessageQueue depends on a socket server.
(And since common.h -> logging.h -> thread.h -> messagequeue.h, this
dependency spreads quickly.)
This starts a new target for a "purified" subset of rtc_base. It adds
the files which are already being used, replacing the use of common.h
with checks.h. desktop_capture is a lost cause, and retains its
dependency on the full rtc_base.
The hope is that as additional components are desired they will be
cleaned and added to rtc_base_approved.
BUG=3806
R=andresp@webrtc.org, henrike@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/22649004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7188 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/base/stringutils.cc b/webrtc/base/stringutils.cc
index 041708d..cb99c25 100644
--- a/webrtc/base/stringutils.cc
+++ b/webrtc/base/stringutils.cc
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/base/checks.h"
#include "webrtc/base/stringutils.h"
-#include "webrtc/base/common.h"
namespace rtc {
@@ -57,7 +57,7 @@
if (n-- == 0) return 0;
c1 = transformation(*s1);
// Double check that characters are not UTF-8
- ASSERT(static_cast<unsigned char>(*s2) < 128);
+ DCHECK_LT(static_cast<unsigned char>(*s2), 128);
// Note: *s2 gets implicitly promoted to wchar_t
c2 = transformation(*s2);
if (c1 != c2) return (c1 < c2) ? -1 : 1;
@@ -80,14 +80,14 @@
#if _DEBUG
// Double check that characters are not UTF-8
for (size_t pos = 0; pos < srclen; ++pos)
- ASSERT(static_cast<unsigned char>(source[pos]) < 128);
+ DCHECK_LT(static_cast<unsigned char>(source[pos]), 128);
#endif // _DEBUG
std::copy(source, source + srclen, buffer);
buffer[srclen] = 0;
return srclen;
}
-#endif // WEBRTC_WIN
+#endif // WEBRTC_WIN
void replace_substrs(const char *search,
size_t search_len,