Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / base / stringutils.cc
index 041708d..cb99c25 100644 (file)
@@ -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 @@ int ascii_string_compare(const wchar_t* s1, const char* s2, size_t n,
     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 @@ size_t asccpyn(wchar_t* buffer, size_t buflen,
 #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,