Skip to content

Commit

Permalink
Merge pull request #32 from tony-mak/master
Browse files Browse the repository at this point in the history
Use MARISA_DEBUG_IF in scoped-*.h as opposed to MARISA_THROW_IF
  • Loading branch information
s-yata authored Sep 26, 2020
2 parents ca018e9 + 88c6d93 commit 006020c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/marisa/scoped-array.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion include/marisa/scoped-ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 006020c

Please sign in to comment.