Merge "Sync https://github.com/s-yata/marisa-trie/pull/32" am: 4dc2729a1c am: b2c0024b8a am: 0f1f759109 am: c39e1b2fde

Original change: https://android-review.googlesource.com/c/platform/external/marisa-trie/+/1440831

Change-Id: Id9c2f0b54de88aed6942226c325db351673d45a3
diff --git a/include/marisa/scoped-array.h b/include/marisa/scoped-array.h
index 12b5b9e..34cefa4 100644
--- a/include/marisa/scoped-array.h
+++ b/include/marisa/scoped-array.h
@@ -16,7 +16,7 @@
   }
 
   void reset(T *array = NULL) {
-    MARISA_THROW_IF((array != NULL) && (array == array_), MARISA_RESET_ERROR);
+    MARISA_DEBUG_IF((array != NULL) && (array == array_), MARISA_RESET_ERROR);
     scoped_array(array).swap(*this);
   }
 
diff --git a/include/marisa/scoped-ptr.h b/include/marisa/scoped-ptr.h
index 63d7a3d..abf48d8 100644
--- a/include/marisa/scoped-ptr.h
+++ b/include/marisa/scoped-ptr.h
@@ -16,7 +16,7 @@
   }
 
   void reset(T *ptr = NULL) {
-    MARISA_THROW_IF((ptr != NULL) && (ptr == ptr_), MARISA_RESET_ERROR);
+    MARISA_DEBUG_IF((ptr != NULL) && (ptr == ptr_), MARISA_RESET_ERROR);
     scoped_ptr(ptr).swap(*this);
   }