Avoid unused variable warning when NDEBUG.
authorscottmg <scottmg@chromium.org>
Tue, 9 Sep 2014 17:28:45 +0000 (17:28 +0000)
committerYoungjae Shin <yj99.shin@samsung.com>
Tue, 9 Jun 2015 11:43:19 +0000 (20:43 +0900)
Author: scottmg@chromium.org
Review URL: https://codereview.appspot.com/134650043

cpp/src/phonenumbers/utf/unicodetext.cc

index ecd3230..660f3b7 100644 (file)
@@ -494,6 +494,7 @@ int UnicodeText::const_iterator::get_utf8(char* utf8_output) const {
 
 
 UnicodeText::const_iterator UnicodeText::MakeIterator(const char* p) const {
+#ifndef NDEBUG
   assert(p != NULL);
   const char* start = utf8_data();
   int len = utf8_length();
@@ -501,6 +502,7 @@ UnicodeText::const_iterator UnicodeText::MakeIterator(const char* p) const {
   assert(p >= start);
   assert(p <= end);
   assert(p == end || !UniLib::IsTrailByte(*p));
+#endif
   return const_iterator(p);
 }