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 @@ class scoped_array { } 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 @@ class scoped_ptr { } 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); }