diff options
author | Tony Mak <tonymak@google.com> | 2020-09-28 11:50:05 +0100 |
---|---|---|
committer | Tony Mak <tonymak@google.com> | 2020-09-28 10:52:13 +0000 |
commit | 54417d28a5273a8d759b28882a0c96335e192756 (patch) | |
tree | f68e9f2c95cfb02b54d9697d8b4a2ae0be2d546c | |
parent | cdb7a341d4cf0b3540a1774ac97b321b97945e47 (diff) | |
download | marisa-trie-54417d28a5273a8d759b28882a0c96335e192756.tar.gz |
Sync https://github.com/s-yata/marisa-trie/pull/32
This allows us from disabling exception support for the whole
libtextclassifier.
The PR was accepted. Cherrypicking the change for now until the library
version is bumped.
Bug: 148777789
Test: Treehugger
Change-Id: If0099adaca2dc046a1870f11bf7eeeda8c4c2ce9
-rw-r--r-- | include/marisa/scoped-array.h | 2 | ||||
-rw-r--r-- | include/marisa/scoped-ptr.h | 2 |
2 files changed, 2 insertions, 2 deletions
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); } |